You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "crdb.py", line 4, in
db_mysql = DBConnect(setup).get()
File "/project/wg/wireguardDB/wireguard_db/models/database.py", line 33, in init
self.set(setup)
File "/project/wg/wireguardDB/wireguard_db/models/database.py", line 81, in set
self.check()
File "/project/wg/wireguardDB/wireguard_db/models/database.py", line 124, in check
dbtable.create_table(safe=True)
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 6717, in create_table
and cls.table_exists():
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 6707, in table_exists
return cls._schema.database.table_exists(M.table.name, M.schema)
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3326, in table_exists
return table_name in self.get_tables(schema=schema)
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 4042, in get_tables
return [table for table, in self.execute_sql(query, ('VIEW',))]
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3158, in execute_sql
cursor = self.cursor(commit)
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3142, in cursor
self.connect()
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3096, in connect
self._state.set_connection(self._connect())
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 4013, in _connect
conn = mysql.connect(db=self.database, **self.connect_params)
File "/usr/local/lib/python3.8/dist-packages/pymysql/connections.py", line 353, in init
self.connect()
File "/usr/local/lib/python3.8/dist-packages/pymysql/connections.py", line 633, in connect
self._request_authentication()
File "/usr/local/lib/python3.8/dist-packages/pymysql/connections.py", line 869, in _request_authentication
authresp = _auth.scramble_caching_sha2(self.password, self.salt)
File "/usr/local/lib/python3.8/dist-packages/pymysql/_auth.py", line 198, in scramble_caching_sha2
p1 = hashlib.sha256(password).digest()
TypeError: object supporting the buffer API required
_
i think my problem in this(i.e. i have DB but show tables; Empty)
File "/project/wg/wireguardDB/wireguard_db/models/database.py", line 33, in init
self.set(setup)
def __init__(self, setup: tuple = None):
"""
Initialize a database connector on given setup
:param config: dict: Optional, the setup from DBConfig.get(), can be setup later
ivar _adapter: str: adapter name
ivar _database: obj: peewee.DatabaseProxy
ivar _connected: bool: connected state of db
"""
self._adapter = None
self._database = None
self._connected = False
if setup:
# full init if setup is given
**self.set(setup)**
FYI little problem YAML file generate with error username instead wguser wgdb
The text was updated successfully, but these errors were encountered:
Sorry, but it's not the time to use this module at the moment. Due to time lack I'm late to push a new version, where the DB is totally different from this one.
Again its me :)
try to connect on Mysql DB
next code:
and my output next:
_> root@node1:/project/wg/wireguardDB# python3 crdb.py
i think my problem in this(i.e. i have DB but show tables; Empty)
File "/project/wg/wireguardDB/wireguard_db/models/database.py", line 33, in init
self.set(setup)
FYI little problem YAML file generate with error username instead wguser wgdb
The text was updated successfully, but these errors were encountered: