nicolewhite / cycli

A Command Line Interface for Neo4j's Cypher.
MIT License
271 stars 25 forks source link

ASCII can't decode error with UTF-8 data in Neo4j #48

Closed canibanoglu closed 7 years ago

canibanoglu commented 8 years ago

Hello,

I noticed that you get the following error when you have non-ASCII characters in your data: 'ascii' codec can't decode byte 0xc4 in position 18: ordinal not in range(128)

This is with Python 2.7.6. I haven't tried with Python 3+ yet but I would expect that to work.

nicolewhite commented 8 years ago

Yeah, it would work fine in Python 3. I haven't developed on Python 2.7 in a while but I can take a look.

brianlakeman commented 7 years ago

Where would I force Cycli to use Python 3? I have 2.x and 3.x installed on OSX. Doesn't appear changing all to Python 3 is a good idea. I'm getting this error from time to time myself. Only issue I've had so far. Love this though! Major time saver for me. Any help is appreciated. Thanks.

victoriastuart commented 6 years ago

FYR, I had that same error,

'ascii' codec can't decode byte 0xce in position 77: ordinal not in range(128)

which crashed Cycli v. 0.7.6 in a Python 2.7 venv on any of these queries:

MATCH (n) RETURN n LIMIT 10;, or

MATCH (n:GlycolysisRelations) RETURN n LIMIT 10;.

etc.

The data included Greek letters, e.g. α-D-glucose, that were likely triggering the crash.

I switched to my Python 3.5 venv and installed Cycli (pip install cycli`), which solved this issue -- for me, at least! :-)

[Additional notes: Arch Linux x86_64 OS; Neo4j version: 3.4.0.alpha09]