question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't Delete a user

See original GitHub issue

Getting this error on user deletion on version redash.0.9.1.b1377

root@ip-172-31-26-238:/opt/redash/current# sudo -u redash bin/run ./manage.py users delete admin
[2016-01-27 00:29:14,101][PID:30373][WARNING][redash.query_runner] MQL query runner enabled but not supported, not registering. Either disable or install missing dependencies.
[2016-01-27 00:29:14,139][PID:30373][WARNING][redash.query_runner] Oracle query runner enabled but not supported, not registering. Either disable or install missing dependencies.
[2016-01-27 00:29:14,333][PID:30373][ERROR][peewee] DELETE FROM "users" WHERE ("email" = %s) [u'admin']
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/playhouse/postgres_ext.py", line 360, in execute_sql
    cursor.execute(sql, params or ())
IntegrityError: update or delete on table "users" violates foreign key constraint "events_user_id_fkey" on table "events"
DETAIL:  Key (id)=(26) is still referenced from table "events".

Traceback (most recent call last):
  File "/opt/redash/redash.0.9.1.b1377/manage.py", line 58, in <module>
    manager.run()
  File "/usr/local/lib/python2.7/dist-packages/flask_script/__init__.py", line 405, in run
    result = self.handle(sys.argv[0], sys.argv[1:])
  File "/usr/local/lib/python2.7/dist-packages/flask_script/__init__.py", line 384, in handle
    return handle(app, *positional_args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask_script/commands.py", line 145, in handle
    return self.run(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask/ctx.py", line 386, in __exit__
    self.auto_pop(exc_value)
  File "/usr/local/lib/python2.7/dist-packages/flask/ctx.py", line 374, in auto_pop
    self.pop(exc)
  File "/usr/local/lib/python2.7/dist-packages/flask/ctx.py", line 341, in pop
    self.app.do_teardown_request(exc)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1714, in do_teardown_request
    rv = func(exc)
  File "/opt/redash/redash.0.9.1.b1377/redash/metrics/request.py", line 39, in calculate_metrics_on_exception
    calculate_metrics(MockResponse(500, '?', -1))
  File "/opt/redash/redash.0.9.1.b1377/redash/metrics/request.py", line 17, in calculate_metrics
    request_duration = (time.time() - g.start_time) * 1000
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/local.py", line 343, in __getattr__
    return getattr(self._get_current_object(), name)
AttributeError: '_AppCtxGlobals' object has no attribute 'start_time'

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:9
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
ryanguillcommented, Sep 6, 2019

disable is not the same as delete.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Delete a user account in windows 10
Press the Windows key or click on Windows icon. · Click on Settings. · Click on Account. · Now click on Family and...
Read more >
Unable to delete user account - Apple Support Communities
I'm currently unable to delete an user account on High Sierra. The minus button is greyed out in the User and Groups panel....
Read more >
Top 6 Options to Delete a User Account in Windows 10
Option 1: Delete Windows 10 User Account with Settings Menu ... Step 1: Open Windows 10 and then type the “Start” menu's sidebar,...
Read more >
How to Delete User Profile to Fix Problematic Windows Account
Press the Windows key + R keyboard shortcut to open the Run dialog. · In the System Properties window, select the Advanced tab...
Read more >
How to delete user profile in Windows 10 - RevoUninstaller
Press Win Key + R on your keyboard. This will open the Run dialog. · In the Advanced System Properties windows navigate to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found