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

can't find '__main__' ??? #6

Closed
m9tz opened this issue Apr 5, 2021 · 3 comments
Closed

can't find '__main__' ??? #6

m9tz opened this issue Apr 5, 2021 · 3 comments

Comments

@m9tz
Copy link

m9tz commented Apr 5, 2021

Hi
first thank for the great work!!!

I get this in pycharm:

/home/mhi/anaconda3/envs/TradingView_Machine_Learning/bin/python: can't find '__main__' module in '/home/mhi/PycharmProjects/TradingView_Machine_Learning'

Process finished with exit code 1

in the linux terminal and conda enviroment:

(TradingView_Machine_Learning) mhi@coha:~/PycharmProjects/TradingView_Machine_Learning$ python3 scripts/stoploss_linear.py 
Traceback (most recent call last):
  File "scripts/stoploss_linear.py", line 3, in <module>
    from functions import click, webdriver, show_me, get, find
ModuleNotFoundError: No module named 'functions'

and that at the normal linux terminal:

mhi@coha:~/PycharmProjects/TradingView_Machine_Learning$ python3 scripts/stoploss_linear.py 
Traceback (most recent call last):
  File "/home/mhi/PycharmProjects/TradingView_Machine_Learning/scripts/stoploss_linear.py", line 3, in <module>
    from functions import click, webdriver, show_me, get, find
ModuleNotFoundError: No module named 'functions'

ok I'am new to pychame! I have to activate the conda enviroment manual in the pychame terminal and the webdriver-manager package can'tbeinstalled via conda only via pip.

but the results from the normal linux-system terminal also failed all modulules are there install with pip in the os default interpreter path

@TreborNamor
Copy link
Owner

TreborNamor commented Apr 5, 2021 via email

@bertinlr
Copy link

bertinlr commented Apr 6, 2021

Is this a related issue? I have the following error:
Loading script...
script has timed out.
Traceback (most recent call last):
File "/Users/bertinlr/Downloads/TradingView_Machine_Learning-master/scripts/takeprofit_linear.py", line 76, in
run_script(webdriver.driver)
File "/Users/bertinlr/Downloads/TradingView_Machine_Learning-master/scripts/takeprofit_linear.py", line 41, in run_script
best_key = find.best_key()
File "/Users/bertinlr/Downloads/TradingView_Machine_Learning-master/functions/find.py", line 5, in best_key
best_in_dict = max(profits, key=profits.get)
ValueError: max() arg is an empty sequence

Process finished with exit code 1

During the weekend was able to run it successfully.

@TreborNamor
Copy link
Owner

ValueError: max() arg is an empty sequence.

This error is because while script was running, it wasn't able to store any data values. So the best_key variable wasn't able to run .max() method. To fix this make sure your click.py file is the same as my new click.py file.

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