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

Load fake data - not working anymore? #231

Open
viktorsmari opened this issue Aug 31, 2019 · 0 comments
Open

Load fake data - not working anymore? #231

viktorsmari opened this issue Aug 31, 2019 · 0 comments

Comments

@viktorsmari
Copy link
Member

viktorsmari commented Aug 31, 2019

Does this still work for anyone?

python manage.py load_fake_data --full

This is very nice to have for people evaluating the software.

Traceback:

============ Wasa2il Features ============

  • topic ENABLED
  • push_notifications DISABLED
  • tasks ENABLED
    ==========================================
    Generating 1114 users ...
    • Creating user "a" with password "a"
      Traceback (most recent call last):
      File "manage.py", line 12, in
      execute_from_command_line(sys.argv)
      File "/home/viktor/dev/piratar/wasa2il/venv/local/lib/python2.7/site-packages/django/core/management/init.py", line 364, in execute_from_command_line
      utility.execute()
      File "/home/viktor/dev/piratar/wasa2il/venv/local/lib/python2.7/site-packages/django/core/management/init.py", line 356, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
      File "/home/viktor/dev/piratar/wasa2il/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
      self.execute(*args, **cmd_options)
      File "/home/viktor/dev/piratar/wasa2il/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
      output = self.handle(*args, **options)
      File "/home/viktor/dev/piratar/wasa2il/venv/local/lib/python2.7/site-packages/django/utils/decorators.py", line 185, in inner
      return func(*args, **kwargs)
      File "/home/viktor/dev/piratar/wasa2il/core/management/commands/load_fake_data.py", line 104, in handle
      users[u] = User.objects.get(email=email)
      File "/home/viktor/dev/piratar/wasa2il/venv/local/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method
      return getattr(self.get_queryset(), name)(*args, **kwargs)
      File "/home/viktor/dev/piratar/wasa2il/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 374, in get
      num = len(clone)
      File "/home/viktor/dev/piratar/wasa2il/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 232, in len
      self._fetch_all()
      File "/home/viktor/dev/piratar/wasa2il/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 1121, in _fetch_all
      self._result_cache = list(self._iterable_class(self))
      File "/home/viktor/dev/piratar/wasa2il/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 53, in iter
      results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
      File "/home/viktor/dev/piratar/wasa2il/venv/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 899, in execute_sql
      raise original_exception
      django.db.transaction.TransactionManagementError: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.

Relevant SO:
https://stackoverflow.com/questions/21458387/transactionmanagementerror-you-cant-execute-queries-until-the-end-of-the-atom

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

1 participant