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

fix(command/dbshell): Avoid raise TypeError when django-3.2 pass `opt… #154

Merged
merged 1 commit into from
Dec 19, 2021

Conversation

icycandle
Copy link
Contributor

…ions['parameters']`

Version:
django==3.2.10
django-cassandra-engine==1.6.3

Reproduce:
python manage.py dbshell

Error message:

$ python manage.py dbshell --database cassandra
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    main()
  File "manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/Users/icycandle/.pyenv/versions/django_chat/lib/python3.7/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/Users/icycandle/.pyenv/versions/django_chat/lib/python3.7/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/icycandle/.pyenv/versions/django_chat/lib/python3.7/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/icycandle/.pyenv/versions/django_chat/lib/python3.7/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/Users/icycandle/.pyenv/versions/django_chat/lib/python3.7/site-packages/django/core/management/commands/dbshell.py", line 26, in handle
    connection.client.runshell(options['parameters'])
TypeError: runshell() takes 1 positional argument but 2 were given

@r4fek r4fek merged commit 47a0723 into r4fek:master Dec 19, 2021
r4fek added a commit that referenced this pull request Jan 11, 2022
* Fix(command/dbshell): Avoid raise TypeError when django-3.2 pass `options[parameters]` (#154) - thanks @icycandle!
* Support Django 4.x
* Drop support for Python <3.7
* replace `cassandra-driver` with `scylla-driver` to better support ScyllaDB (Scylla driver is fully compatible with Cassandra)
* Get rid of travis build system in favor of Github Actions (faster build times, better integration with Github)
* Reformat entire codebase with flake8, isort and black
* Add code style check to the build process
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

Successfully merging this pull request may close these issues.

2 participants