clueboy / pymssql_issues

0 stars 0 forks source link

freetds.conf not found in /home/rsyring/dev/freetds/built/etc/freetds.conf (not looking in /etc/freetds ) #104

Open clueboy opened 10 years ago

clueboy commented 10 years ago

From oetelaar.automatisering on November 19, 2012 10:03:01

READ FIRST Please (and then delete): * Support requests should be posted here (not reported as bugs): http://groups.google.com/group/pymssql * 1.x branch of pymssql is no longer supported, please don't report bugs for it What steps will reproduce the problem? 1. Install the pymssql-2.0.0b1_dev_20111018-py2.7-linux-x86_64.egg

  1. Run a query
  2. See where it looks for info (with strace) What is the expected output? What do you see instead? I expect it to look in /etc/freetds/freetds.conf

What do I see:

24985 open("/home/oetelaar/.freetds.conf", O_RDONLY) = -1 ENOENT (No such file or directory) 24985 open("/home/rsyring/dev/freetds/built/etc/freetds.conf", O_RDONLY) = -1 ENOENT (No such file or directory)

This means it uses some build directory (which is not on my machine) Then it tries my home directory (where I did not have a freetds.conf file. What version of the product are you using? On what operating system? Linux Ubuntu :

python -V

Python 2.7.3

uname -a

Linux i7-ssd-pc 3.2.0-33-generic #52-Ubuntu SMP Thu Oct 18 16:29:15 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux Please provide any additional information below. - Looks like a build/package problem

Original issue: http://code.google.com/p/pymssql/issues/detail?id=104

clueboy commented 10 years ago

From oetelaar.automatisering on November 19, 2012 10:10:50

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
clueboy commented 10 years ago

From msabramo on January 06, 2013 19:45:05

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

Status: Accepted

clueboy commented 10 years ago

From msabramo on January 06, 2013 21:32:06

Labels: FreeTDSbundlingrelated

clueboy commented 10 years ago

From msabramo on August 30, 2013 09:47:48

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.