FirebirdSQL / fdb

Firebird Driver for Python
https://www.firebirdsql.org/en/devel-python-driver/
Other
60 stars 26 forks source link

AttributeError: 'bytes' object has no attribute 'encode' #9

Open eduardoroliveira opened 4 years ago

eduardoroliveira commented 4 years ago

I see this error while running a project using python3.7:

File "/usr/local/lib/python3.7/site-packages/fdb/fbcore.py", line 845, in connect no_reserve, db_key_scope, no_gc, no_db_triggers, no_linger) File "/usr/local/lib/python3.7/site-packages/fdb/fbcore.py", line 773, in build_dpb dpb.add_string_parameter(isc_dpb_user_name, user) File "/usr/local/lib/python3.7/site-packages/fdb/fbcore.py", line 633, in add_string_parameter value = value.encode(charset_map.get(self.charset, self.charset)) AttributeError: 'bytes' object has no attribute 'encode'