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 #32

Open
nospam999 opened this issue Mar 6, 2021 · 2 comments
Open

SyntaxError #32

nospam999 opened this issue Mar 6, 2021 · 2 comments

Comments

@nospam999
Copy link

nospam999 commented Mar 6, 2021

Hello, I cannot run the code because I get this error:

(venv) linus@linux:~/trading/Deep-Reinforcement-Learning-for-Automated-Stock-Trading-Ensemble-Strategy-ICAIF-2020$ python run_DRL.py
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
  * https://github.com/tensorflow/io (for I/O related ops)
If you depend on functionality not listed there, please file an issue.

Traceback (most recent call last):
  File "run_DRL.py", line 12, in <module>
    from model.models import *
  File "/home/linus/trading/Deep-Reinforcement-Learning-for-Automated-Stock-Trading-Ensemble-Strategy-ICAIF-2020/model/models.py", line 23, in <module>
    from env.EnvMultipleStock_train import StockEnvTrain
  File "/home/linus/trading/Deep-Reinforcement-Learning-for-Automated-Stock-Trading-Ensemble-Strategy-ICAIF-2020/venv/lib/python3.6/site-packages/env.py", line 51
    print k
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(k)?

> `
```
@nospam999 nospam999 changed the title import error SyntaxError Mar 6, 2021
@nospam999
Copy link
Author

okay, I think the problem was there were no brackets at the print-statetement (how could this script ran at your computer?)
now another problem (this script is so horrible):

> myvenv) linus@linux:~/trading/Deep-Reinforcement-Learning-for-Automated-Stock-Trading-Ensemble-Strategy-ICAIF-2020$ python run_DRL.py
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
  * https://github.com/tensorflow/io (for I/O related ops)
If you depend on functionality not listed there, please file an issue.

Traceback (most recent call last):
  File "run_DRL.py", line 12, in <module>
    from model.models import *
  File "/home/linus/trading/Deep-Reinforcement-Learning-for-Automated-Stock-Trading-Ensemble-Strategy-ICAIF-2020/model/models.py", line 24, in <module>
    from env.EnvMultipleStock_validation import StockEnvValidation
  File "/home/linus/trading/Deep-Reinforcement-Learning-for-Automated-Stock-Trading-Ensemble-Strategy-ICAIF-2020/myvenv/lib/python3.6/site-packages/env.py", line 4, in <module>
    from urlparse import urlparse as _urlparse
ModuleNotFoundError: No module named 'urlparse'
`` 

@IvanTrujilloTrujillo
Copy link

You installed python package 'env' and in models.py it is importing this package, but this isn't what the package you need. You have to uninstall 'env' and create three files im a folder/module called 'env'. The have it in the repo but they deleted it in this commit: Hi! I found they deleted them when refactoring and never solve it. Here is the commit when this happened, you can take the files from there: 20b5898 and never solve it. You can restore it the files from this commit.

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

2 participants