uwescience / sqlshare-pythonclient

The Python client for the SQLShare REST API
3 stars 1 forks source link

error (different?) with fetchdata #6

Closed sr320 closed 11 years ago

sr320 commented 11 years ago

I am trying to download https://sqlshare.escience.washington.edu/sqlshare#s=query/sr320%2540washington.edu/BiGo_methratio_GFF_boop&q= as tab. I see other issues with fetchdata but in the event this is something different... (I think it is upon looking at the other issues).

command
python fetchdata.py -d "[sr320@washington.edu].[BiGo_methratio_GFF_boop]​" -f tsv -o /Volumes/web/cnidarian/BiGo_methratio_boop.gff

error

Traceback (most recent call last):
  File "fetchdata.py", line 77, in <module>
    main()
  File "fetchdata.py", line 71, in main
    data = fetchdata(args.sql, args.format)
  File "fetchdata.py", line 30, in fetchdata
    return conn.download_sql_result(sql, format)
  File "/Library/Python/2.7/site-packages/SQLShare-0.1a-py2.7.egg/sqlshare/__init__.py", line 328, in download_sql_result
    return self.poll_selector(selector)
  File "/Library/Python/2.7/site-packages/SQLShare-0.1a-py2.7.egg/sqlshare/__init__.py", line 247, in poll_selector
    else: return res.read()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 533, in read
    return self._read_chunked(amt)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 566, in _read_chunked
    line = self.fp.readline()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 430, in readline
    data = recv(1)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 219, in recv
    return self.read(buflen)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 138, in read
    return self._sslobj.read(len)
socket.error: [Errno 54] Connection reset by peer
dhalperi commented 11 years ago

No, this is the same bug as Mac's the other day; it's a defect in the SQLShare backend. I'll try and see if I can generate a workaround for you.

You should be able to download the file from the SQLShare UI in the meantime, if that will work. (I know, you need it tab-separated, right?)

Dan

On Thu, Jul 25, 2013 at 2:45 PM, sr320 notifications@github.com wrote:

I am trying to download https://sqlshare.escience.washington.edu/sqlshare#s=query/sr320%2540washington.edu/BiGo_methratio_GFF_boop&q=as tab. I see other issues with fetchdata but in the event this is something different... (I think it is upon looking at the other issues).

command

python fetchdata.py -d "[sr320@washington.edu].[BiGo_methratio_GFF_boop]" -f tsv -o /Volumes/web/cnidarian/BiGo_methratio_boop.gff

error

Traceback (most recent call last): File "fetchdata.py", line 77, in main() File "fetchdata.py", line 71, in main data = fetchdata(args.sql, args.format) File "fetchdata.py", line 30, in fetchdata return conn.download_sql_result(sql, format) File "/Library/Python/2.7/site-packages/SQLShare-0.1a-py2.7.egg/sqlshare/init.py", line 328, in download_sql_result return self.poll_selector(selector) File "/Library/Python/2.7/site-packages/SQLShare-0.1a-py2.7.egg/sqlshare/init.py", line 247, in poll_selector else: return res.read() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 533, in read return self._read_chunked(amt) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 566, in _read_chunked line = self.fp.readline() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 430, in readline data = recv(1) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 219, in recv return self.read(buflen) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 138, in read return self._sslobj.read(len) socket.error: [Errno 54] Connection reset by peer

— Reply to this email directly or view it on GitHubhttps://github.com/uwescience/sqlshare-pythonclient/issues/6 .

dhalperi commented 11 years ago

Hi @sr320, can you please try this again and see if it works? @schitnis has updated the code in the backend.

Dan

sr320 commented 11 years ago

Tried again, and worked! thanks

dhalperi commented 11 years ago

Thanks!