0

I've been struggling for a day with this one: I have a program that basically connects to two data sources (one ODBC with pyodbc, the other one to MariaDB with mysqlclient) and transfers data from one to the other.

When the pyodbc connection fails, an error message appears, such as this one:

pyodbc.InterfaceError: ('28000', '[28000] [FileMaker][FileMaker]  (212): Invalid account/password\x00\u75c0*\u75c0*\u33e4*\x1f\x00\u6029\u4ed6\uf278\u011e\u65aa\u669b\u4ae0+\u75c0*\u6029\u4ed6\uf270\u011e\x00\x00\x00\x00\u36a8\x1b\x00\x00\x01\x00\x1f\x00\x01\x00\uf28c\u011e\uf290\u011e\u351a\u669e\x06\x00\ub0201\uf2b8\u011e\ua975\u66a0\x00\x00\x1f\x00 (212) (SQLDriverConnect); [28000] [FileMaker][FileMaker]  (212): Invalid account/password\x00\u75c0*\u75c0*\u33e4*\x1f\x00\u6029\u4ed6\uf278\u011e\u65aa\u669b\u4ae0+\u75c0*\u6029\u4ed6\uf270\u011e\x00\x00\x00\x00\u36a8\x1b\x00\x00\x01\x00\x1f\x00\x01\x00\uf28c\u011e\uf290\u011e\u351a\u669e\x06\x00\ub0201\uf2b8\u011e\ua975\u66a0\x00\x00\x1f\x00 (212)')

As you see, it contains lots of what seems to be UTF16 (LE ??) characters. I tried tons of ways to make this string readable, even just cutting it at the first \x00, none of them worked properly. Does anyone know how to make it readable?

Also: this problem only happens on windows. The same script runs perfectly on a mac.

X99
  • 905
  • 10
  • 24
  • Does this question help? https://stackoverflow.com/questions/6361775/utf-16-to-ascii-ignoring-characters-with-decimal-value-greater-than-127 – ejderuby Jul 24 '19 at 13:20
  • https://stackoverflow.com/questions/2365411/convert-unicode-to-ascii-without-errors-in-python – ejderuby Jul 24 '19 at 13:22
  • I tried both solutions already, the result is still quite the same. – X99 Jul 24 '19 at 13:33
  • I don't think this is translatable to human-speak. I would just try to find the origin of the error by checking the account/password and other various connection issues. – ejderuby Jul 24 '19 at 13:48
  • It is, it's indeed a Windows-related problem. On a mac, the message appears as "Error is: ('28000', '[28000] [FileMaker][FileMaker ODBC] (213): Password incorrect (213) (SQLDriverConnect)')" – X99 Jul 24 '19 at 14:06
  • I tried copy-pasting it to this website and it didn't bring anything up. https://encoder.mattiasgeniar.be/index.php – ejderuby Jul 24 '19 at 14:08
  • Yes, I tried many of these sites too, no luck so far. – X99 Jul 24 '19 at 14:18

0 Answers0