0

I have problem with export data to pandas from Exasol v.6.0.4. I can connect with Exasol but when I want to transport data to pandas DataFrame then I have error. I'm using library pyexasol. My code is following:

from pyexasol import ExaConnection
con = ExaConnection(dsn=dns, user=user, password=password)
con.execute('OPEN SCHEMA SCHEMATEST1') #to this moment everything works correct
data = con.export_to_pandas('select * from TABLETEST1') # pandas data frame per default

Error:

TypeError: cannot serialize '_io.FileIO' object

What I've done bad? How I can export data from Exasol query to Pandas DataFrame? My libraries and version of tools:

Exasol 6.0.4
Python 3.6.4

Libraries:
backcall (0.1.0)
bleach (2.1.3)
colorama (0.3.9)
decorator (4.3.0)
entrypoints (0.2.3)
html5lib (1.0.1)
ipykernel (4.8.2)
ipython (6.4.0)
ipython-genutils (0.2.0)
ipywidgets (7.2.1)
jedi (0.12.0)
Jinja2 (2.10)
jsonschema (2.6.0)
jupyter (1.0.0)
jupyter-client (5.2.3)
jupyter-console (5.2.0)
jupyter-core (4.4.0)
MarkupSafe (1.0)
mistune (0.8.3)
nbconvert (5.3.1)
nbformat (4.4.0)
notebook (5.5.0)
numpy (1.14.3)
pandas (0.23.0)
pandocfilters (1.4.2)
parso (0.2.1)
pickleshare (0.7.4)
pip (9.0.1)
prompt-toolkit (1.0.15)
pyasn1 (0.4.2)
pyexasol (0.3.17)
Pygments (2.2.0)
pyodbc (4.0.23)
python-dateutil (2.7.3)
pytz (2018.4)
pywinpty (0.5.1)
pyzmq (17.0.0)
qtconsole (4.3.1)
rsa (3.4.2)
scikit-learn (0.19.1)
scipy (1.1.0)
Send2Trash (1.5.0)
setuptools (28.8.0)
simplegeneric (0.8.1)
six (1.11.0)
sklearn (0.0)
terminado (0.8.1)
testpath (0.3.1)
tornado (5.0.2)
traitlets (4.3.2)
wcwidth (0.1.7)
webencodings (0.5.1)
websocket-client (0.47.0)
widgetsnbextension (3.2.1)

Please help! :)

Ilja Everilä
  • 50,538
  • 7
  • 126
  • 127

1 Answers1

0

PyEXASOL creator is here! Your code is correct.

This problem was related to Windows "multiprocessing" module implementation lacking fork() and trying to serialize pipe handles created in http_transport.py.

This problem was FIXED starting from version 0.3.23. Please update the package.

pip install --upgrade pyexasol
wildraid
  • 126
  • 4
  • Hi @wildraid I update package to version 0.3.23 but it didn't resolve my problem. Now I have following error: UnsupportedOperation: fileno – Przemysław Kaczmarek Jun 22 '18 at 13:36
  • Could you please help me more? – Przemysław Kaczmarek Jun 22 '18 at 13:39
  • @PrzemysławKaczmarek, hmm, this is confusing. Could you update to latest version again (0.3.26 this time) and provie the full strack trace for error? You may also open an issue on github to attach long text. Thanks! P.S. Please also make sure you do NOT use latest pandas version 0.23.1. CSV code is broken in this specific version. It should be fixed in 0.23.2. – wildraid Jun 23 '18 at 20:34
  • @PrzemysławKaczmarek, one of my colleagues managed to reproduce this problem. It was related specifically for Jupyter Notebook overloading standard sys.stderr. It was fixed in 0.3.27. Link to github issue: https://github.com/badoo/pyexasol/issues/9 – wildraid Jun 28 '18 at 14:08