sum12 / rqlite-django

Django Backend for the Rqlite Database
MIT License
3 stars 1 forks source link

TypeError: __init__() got an unexpected keyword argument 'always_transactions' #2

Open dazhi509 opened 5 years ago

dazhi509 commented 5 years ago

i use rqlite as cluster in 3 node: 10.0.0.1-3, and i have done every step as you wrote, but i get error as below when i start django project:

Exception ignored in: <bound method Connection.__del__ of <pyrqlite.connections.Connection object at 0x7fb0635202b0>>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/pyrqlite/connections.py", line 128, in __del__
    self.close()
  File "/usr/local/lib/python3.6/dist-packages/pyrqlite/connections.py", line 122, in close
    self._connection.close()
AttributeError: 'Connection' object has no attribute '_connection'
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7fb063e08f28>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/django/utils/autoreload.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/commands/runserver.py", line 124, in inner_run
    self.check_migrations()
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/base.py", line 427, in check_migrations
    executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
  File "/usr/local/lib/python3.6/dist-packages/django/db/migrations/executor.py", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/usr/local/lib/python3.6/dist-packages/django/db/migrations/loader.py", line 49, in __init__
    self.build_graph()
  File "/usr/local/lib/python3.6/dist-packages/django/db/migrations/loader.py", line 206, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "/usr/local/lib/python3.6/dist-packages/django/db/migrations/recorder.py", line 61, in applied_migrations
    if self.has_table():
  File "/usr/local/lib/python3.6/dist-packages/django/db/migrations/recorder.py", line 44, in has_table
    return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor())
  File "/usr/local/lib/python3.6/dist-packages/django/db/backends/base/base.py", line 255, in cursor
    return self._cursor()
  File "/usr/local/lib/python3.6/dist-packages/django/db/backends/base/base.py", line 232, in _cursor
    self.ensure_connection()
  File "/usr/local/lib/python3.6/dist-packages/django/db/backends/base/base.py", line 216, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.6/dist-packages/django/db/backends/base/base.py", line 194, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/local/lib/python3.6/dist-packages/rqlite/djangobackend/base.py", line 130, in get_new_connection
    conn = Database.connect(**conn_params)
TypeError: __init__() got an unexpected keyword argument 'always_transactions'

is anything i did wrong ?

version:
python3.6, rqlite4.3.1
sum12 commented 5 years ago

Are you are still using rqlite ? I could help you with this.

dazhi509 commented 5 years ago

yes, i am working with rqlite, help me please

sum12 commented 5 years ago

The problem should be fixed now.

Have a look the readme too before trying again. Let me know if you need more help. Or else just close the ticket.

On Fri, Mar 8, 2019, 02:09 dazhi509 notifications@github.com wrote:

yes, i am working with rqlite, help me please

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sum12/rqlite-django/issues/2#issuecomment-470764607, or mute the thread https://github.com/notifications/unsubscribe-auth/ADIhEwMAoox7Diuofcq_RQKnX7rWuQmUks5vUbhZgaJpZM4ZmVQU .