Closed nosaJjr closed 6 years ago
@nosaJjr If you just read the console I bet you can figure it out the error by yourself.
[...]
IOError: [Errno 2] No such file or directory: 'ORDER'
[...]
Have you deleted this file? It is on the root of the repository.
[MOST LIKELY] Another reason that may be causing this problem is that you're running the trader.py
from the outside of the directory. The file open system trader.py <line 45>
is not using relative paths, so you have to run this script from the root directory of the repository, otherwise the script can't find the given file.
This bot is completely experimental and it has yet a lot of cases to cover. To increase your chances of using it correctly, try to change the environment as little as possible.
@yasinkuyu a solution that I use for dealing with file handling and paths is using the os
and sys
modules.
import os
import path
[...]
open(os.path.join(sys.path[0], "file_to_be_opened"), "r");
Assuming that file_to_be_opened
is located in the same level as the main script.
no i haven't deleted any files
i received this error
Traceback (most recent call last): File "/Users/SoleATCService/Desktop/binance-trader-master/trader.py", line 216, in
main()
File "/Users/SoleATCService/Desktop/binance-trader-master/trader.py", line 209, in main
action(symbol)
File "/Users/SoleATCService/Desktop/binance-trader-master/trader.py", line 129, in action
file = open("ORDER", "r")
IOError: [Errno 2] No such file or directory: 'ORDER'