Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[makefixture] cannot create fixtures #28

Open
viciu opened this issue Jan 26, 2012 · 1 comment
Open

[makefixture] cannot create fixtures #28

viciu opened this issue Jan 26, 2012 · 1 comment

Comments

@viciu
Copy link

viciu commented Jan 26, 2012

When running e.g. manage.py makefixture auth.User
an exception is thrown:

Traceback (most recent call last):
  File "./manage.py", line 11, in <module>
    execute_manager(settings)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.6/dist-packages/test_utils/management/commands/makefixture.py", line 126, in handle
    label_output = self.handle_label(labels, **options)
  File "/usr/local/lib/python2.6/dist-packages/test_utils/management/commands/makefixture.py", line 115, in handle_label
    return self.handle_models(parsed, **options)
  File "/usr/local/lib/python2.6/dist-packages/test_utils/management/commands/makefixture.py", line 53, in handle_models
    objects.extend(model._default_manager.filter(pk__exact=slice))
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/manager.py", line 141, in filter
    return self.get_query_set().filter(*args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 550, in filter
    return self._filter_or_exclude(False, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 568, in _filter_or_exclude
    clone.query.add_q(Q(*args, **kwargs))
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/query.py", line 1194, in add_q
    can_reuse=used_aliases, force_having=force_having)
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/query.py", line 1129, in add_filter
    connector)
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/where.py", line 67, in add
    value = obj.prepare(lookup_type, value)
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/where.py", line 316, in prepare
    return self.field.get_prep_lookup(lookup_type, value)
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/fields/__init__.py", line 292, in get_prep_lookup
    return self.get_prep_value(value)
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/fields/__init__.py", line 479, in get_prep_value
    return int(value)
ValueError: invalid literal for int() with base 10: ''

I'm using django 1.3.1 and django-test-utils 0.3

@ernop
Copy link
Contributor

ernop commented Jun 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants