Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: Non-ASCII character #166

Open
123qweas opened this issue Oct 25, 2018 · 8 comments
Open

SyntaxError: Non-ASCII character #166

123qweas opened this issue Oct 25, 2018 · 8 comments

Comments

@123qweas
Copy link

Hello,

if installed Japonicus as shown in the Wiki/Setup.
The installation went fine but when I tried to run Japonicus with:

python japonicus-run -g --strat MACD --repeat 100 -w

The output:

Traceback (most recent call last): File "japonicus-run", line 4, in <module> import japonicus File "/Users/gekko-stable/gekko/japonicus-master/japonicus/__init__.py", line 3, in <module> from .japonicus import * File "/Users/gekko-stable/gekko/japonicus-master/japonicus/japonicus.py", line 24 SyntaxError: Non-ASCII character '\xe2' in file /Users/gekko-stable/gekko/japonicus-master/japonicus/japonicus.py on line 25, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

I have Gekko (v0.6.7) as a server running (node web/server.js)and have history data downloaded.
I've took the same steps on two systems with the same error. (MacBook Pro and a Hackintosh)
I also reinstalled Gekko and Japonicus - same error.
The weblink in the error did not help me either.

Does anyone have an idea how to fix this?

@123qweas
Copy link
Author

After installing it again I noticed that after running:
sudo pip3 install -r requirements.txt
I got this error at the end:
Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-bdu15lux/cchardet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-u8ubswt9/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-install-bdu15lux/cchardet/

I don't know what that means but maybe someone knows.

@verbraucher
Copy link

verbraucher commented Oct 26, 2018

@123qweas pls try to exceute it as follwing: python3.6 japonicus-run -g --strat MACD --repeat 100 -w

@Gab0
Copy link
Owner

Gab0 commented Oct 26, 2018

Yeah, try to sudo pip3 install --upgrade pip to update pip, install requirements, and run it with python3.
cheers!

@123qweas
Copy link
Author

Thanks for you help!
Unfortunately I get an other error now:
Traceback (most recent call last): File "japonicus-run", line 4, in <module> import japonicus File "/Users/gekko-stable/gekko-0.6.7/japonicus-master/japonicus/__init__.py", line 3, in <module> from .japonicus import * File "/Users/gekko-stable/gekko-0.6.7/japonicus-master/japonicus/japonicus.py", line 5, in <module> from . import Settings File "/Users/gekko-stable/gekko-0.6.7/japonicus-master/japonicus/Settings.py", line 2, in <module> import js2py ModuleNotFoundError: No module named 'js2py'
After executing:
python3.6 japonicus-run -g --strat MACD --repeat 100 -w

Executing
python3 japonicus-run -g --strat MACD --repeat 100 -w
had the same error as output.

@ghost
Copy link

ghost commented Oct 27, 2018

no module named 'js2py' simply means you have to install that particular module (js2py in this case)
run this for future development
python3 -m pip install numpy pandas cython js2py

@ghost
Copy link

ghost commented Oct 27, 2018

another thing to remember, if you install your modules with python3, you can't access them with python3.6
so keep the version in mind when installing the modules and running the code

@123qweas
Copy link
Author

OK.
Thank you very much.
I could install all the missing modules and had to update dash.
But now I get this error:
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/deap/tools/_hypervolume/pyhv.py:33: ImportWarning: Falling back to the python version of hypervolume module. Expect this to be very slow. "module. Expect this to be very slow.", ImportWarning) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py:205: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__ return f(*args, **kwds) Aborted: gekko.js not found on path specified @Settings.py;
After running:
python3 japonicus-run -g --strat MACD --repeat 100 -w
I installed all modules with python3 but even when I use:
python3.6 japonicus-run -g --strat MACD --repeat 100 -w
I get the same error:

gekko-stables-iMac:japonicus-master gekko-stable$ python3 japonicus-run -g --strat MACD --repeat 100 -w /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/deap/tools/_hypervolume/pyhv.py:33: ImportWarning: Falling back to the python version of hypervolume module. Expect this to be very slow. "module. Expect this to be very slow.", ImportWarning) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py:205: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__ return f(*args, **kwds) Aborted: gekko.js not found on path specified @Settings.py; gekko-stables-iMac:japonicus-master gekko-stable$ python3.6 japonicus-run -g --strat MACD --repeat 100 -w /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/deap/tools/_hypervolume/pyhv.py:33: ImportWarning: Falling back to the python version of hypervolume module. Expect this to be very slow. "module. Expect this to be very slow.", ImportWarning) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py:205: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__ return f(*args, **kwds) Aborted: gekko.js not found on path specified @Settings.py;
Do you think you can help me?

@Gab0
Copy link
Owner

Gab0 commented Oct 31, 2018

hey, the message is Aborted: gekko.js not found on path specified @Settings.py
check gekko.js path at settings/global.py.
cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants