Open GoogleCodeExporter opened 8 years ago
Accepted. I will look into this issue during weekends.
Original comment by jiangwen...@gmail.com
on 2 May 2013 at 1:34
Got into the same error with SQL Server 2008R2. But i still managed to work on
my laptop with the very same SQL Server 2008R2 and winpython 3.3.0-32bit
installed. Checking for difference between my notebook and the server online
ODBC configuration and found that if, at the end of ODBC connection config, i
uncheck the box that force for regional preferences, it would work.
Original comment by iuri.que...@gmail.com
on 23 May 2013 at 11:57
Issue 23 has been merged into this issue.
Original comment by jiangwen...@gmail.com
on 3 Sep 2013 at 5:53
Hi,
Any updates on this issue?
Original comment by aleksey....@gmail.com
on 6 Sep 2013 at 2:41
I just update the source in GitHub , I think it can solve the connection
problem, but not sure if date, time, datetime types can function normally with
this version.
You can download this latest version from:
https://github.com/jiangwen365/pypyodbc/raw/master/pypyodbc.py
Original comment by jiangwen...@gmail.com
on 8 Sep 2013 at 3:25
Hi, Please try version 1.2.0.
Original comment by jiangwen...@gmail.com
on 21 Sep 2013 at 11:28
Version 1.2.0 resolved my issue (#23); thanks for the update!
Original comment by d...@dlasley.net
on 25 Sep 2013 at 5:25
As an update, I can now connect to the database but am still receiving this
error randomly while performing fetches. The new traceback is:
Traceback (most recent call last):
File "/data01/python/wins_legacy/e2e/usage_gatherer.py", line 279, in <module>
usage_mon.daemonize()
File "/data01/python/wins_legacy/e2e/usage_gatherer.py", line 99, in daemonize
method()
File "/data01/python/wins_legacy/e2e/usage_gatherer.py", line 126, in usage_gather
medusa_data = self.mssql.query(_med_query)
File "/data01/python/wins_legacy/db_core/mssql.py", line 66, in query
for row in self.cursor.fetchall():
File "/opt/pypy-2.1/site-packages/pypyodbc-1.2.0-py2.7.egg/pypyodbc.py", line 1762, in fetchall
row = self.fetchone()
File "/opt/pypy-2.1/site-packages/pypyodbc-1.2.0-py2.7.egg/pypyodbc.py", line 1805, in fetchone
value_list.append(buf_cvt_func(alloc_buffer.value))
ValueError: invalid literal for int() with base 10: ''
I noticed that you have a print statement above this line; I added some logging
for those values (col_name, target_type, alloc_buffer.value) so maybe the log
can provide some insight on what is happening here. This is an intermittent
issue, I'm thinking it's due to some blank data in the database. I'll get back
to you when I have some data.
Original comment by d...@dlasley.net
on 26 Sep 2013 at 4:21
It seems that my hypothesis was correct, this is occurring on blank int/float
cols. My fix was to add a try/except for a ValueError, appending None to the
value_list for blank data. I have attached a patch that resolves this issue as
I did not see a way to send a pull request.
Original comment by d...@dlasley.net
on 2 Oct 2013 at 8:58
Attachments:
Original issue reported on code.google.com by
jah...@gmail.com
on 26 Apr 2013 at 9:58