-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Labels

Description
I kept getting the error AttributeError: 'DatabaseWrapper' object has no attribute 'encoding'
and it turns out that encoding is only set by default in this block of base.py if there is an OPTIONS
key who's value is a dictionary with least one key.
Workaround: add an OPTIONS
key to your config that has a populated dictionary
Possible solutions:
- Check and set base.py after line 202 with something like
self.encoding = 'utf-8'
and also update the README.rst to reflect that encoding isn't only set to 'utf-8' by default when OPTIONS
is specified
- Change line 394 in base.py from 'return CursorWrapper(cursor, self.driver_supports_utf8, self.encoding, self)' to 'return CursorWrapper(cursor, self.driver_supports_utf8, getattr(self, 'encoding'), self)
CursorWrapper's init function is ready to handle None/empty string values, so I'm not sure which solution works better behind the goals of the project.