Closed GoogleCodeExporter closed 9 years ago
I found this problem because of encoding issues.
The error message : UnicodeDecodeError: 'utf8' codec can't decode byte 0xeb in
position 6: invalid continuation byte python 2.7
started my investigation that ended by adding the UTF-8 encoding in the
.freetds.conf file in my homedirectory
# server specific section
[global]
# TDS protocol version
tds version = 8.0
client charset = UTF-8
Original comment by oetelaar.automatisering
on 19 Nov 2012 at 6:10
Oops, it looks like Randy built the FreeTDS library with paths to his home
directory in it:
vagrant@lucid64:~/dev/hg-repos/pymssql$ strings freetds/nix_64/lib/libsybdb.a
| grep rsyring | sort -u
/home/rsyring/dev/freetds/built/etc
/home/rsyring/dev/freetds/built/etc/freetds.conf
/home/rsyring/dev/freetds/built/etc/locales.conf
/home/rsyring/dev/freetds/freetds-0.91/src/dblib
/home/rsyring/dev/freetds/freetds-0.91/src/replacements
/home/rsyring/dev/freetds/freetds-0.91/src/tds
Original comment by msabr...@gmail.com
on 7 Jan 2013 at 3:45
Original comment by msabr...@gmail.com
on 7 Jan 2013 at 5:32
Hey Randy,
It's probably been a long time and you might not remember, but do you know what
settings you used to build FreeTDS?
I thought maybe we could rebuild the bundled FreeTDS and have it looks for
freetds.conf in a more standard location.
Original comment by msabr...@gmail.com
on 30 Aug 2013 at 4:47
Fixed with
https://github.com/pymssql/pymssql/commit/24cea499ac711bf92100895694c3badaab90f7
c0.
Tested with:
marca@marca-ubuntu12:~/dev/git-repos/pymssql$ rm .so .c marca@marca-ubuntu12:~/dev/git-repos/pymssql$ PYMSSQL_BUILD_WITH_BUNDLED_FREETDS=1 python setup.py build_ext -i setup.py: platform.system() => 'Linux' setup.py: platform.architecture() => ('64bit', 'ELF') setup.py: platform.linux_distribution() => ('Ubuntu', '12.04', 'precise') setup.py: platform.libc_ver() => ('glibc', '2.7') setup.py: libc_has_vasprintf_chk = True setup.py: Using bundled FreeTDS in /home/marca/dev/git-repos/pymssql/freetds/nix_64 ... marca@marca-ubuntu12:~/dev/git-repos/pymssql$ strace -e open python test_debug_queries.py 2>&1 | grep 'freetds.conf' open("/home/marca/.freetds.conf", O_RDONLY) = 3 open("/etc/freetds/freetds.conf", O_RDONLY) = 3 open("/home/marca/.freetds.conf", O_RDONLY) = 3
Original comment by msabr...@gmail.com
on 25 Sep 2013 at 12:20
Original issue reported on code.google.com by
oetelaar.automatisering
on 19 Nov 2012 at 6:03