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

ProgrammingError raised from silk_clear_request_log #293

Closed
thenewguy opened this issue Jul 3, 2018 · 1 comment
Closed

ProgrammingError raised from silk_clear_request_log #293

thenewguy opened this issue Jul 3, 2018 · 1 comment

Comments

@thenewguy
Copy link

$ sudo docker exec -i -t compose_backend_1 python manage.py silk_clear_request_log
WARNING|2018-07-03 12:36:42,765|silk.profiling.profiler>>
Cannot execute silk_profile as silk is not installed correctly.
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/silk/management/commands/silk_clear_request_log.py", line 41, in handle
    Command.delete_model(silk.models.Profile)
  File "/usr/local/lib/python2.7/dist-packages/silk/management/commands/silk_clear_request_log.py", line 21, in delete_model
    cursor.execute("ALTER TABLE %s DISABLE TRIGGER ALL;", [table])
  File "/usr/local/lib/python2.7/dist-packages/cachalot/monkey_patch.py", line 119, in inner
    return original(cursor, sql, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: syntax error at or near "'silk_profile'"
LINE 1: ALTER TABLE 'silk_profile' DISABLE TRIGGER ALL;
                    ^

DB is library/postgres:9.4.5

@albertyw
Copy link
Member

albertyw commented Jul 3, 2018

Duplicate of #290.

@albertyw albertyw closed this as completed Jul 3, 2018
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