crypto-arbitrage-framework icon indicating copy to clipboard operation
crypto-arbitrage-framework copied to clipboard

attempted relative import with no known parent package

Open shlx17 opened this issue 4 years ago • 2 comments

Hi there Thank you for this wonderful work. I was recently trying to install the script. Unfortunately, I stumbled upon a terminal error message, that looks as given below.

It would be great if someone could give me a hint how to solve this issue.

shlx@ubntqnap64:~/Dokumente/crypto-arbitrage-framework-master/crypto$ python3 main.py

Traceback (most recent call last):
  File "main.py", line 2, in <module>
    from path_optimizer import PathOptimizer
  File "/home/shlx/Dokumente/crypto-arbitrage-framework-master/crypto/path_optimizer.py", line 4, in <module>
    from .info import fiat, trading_fee, tokens
ImportError: attempted relative import with no known parent package

shlx17 avatar Apr 05 '20 14:04 shlx17

Im also getting an similar errror, related to import:

from crypto.exchanges import exchanges

The line above fails with the following error:

F:\GITREP\crypto-arbitrage-framework>C:/Python38/python.exe f:/GITREP/crypto-arbitrage-framework/crypto/main.py Traceback (most recent call last): File "f:/GITREP/crypto-arbitrage-framework/crypto/main.py", line 1, in from crypto.exchanges import exchanges ModuleNotFoundError: No module named 'crypto'

Oh ! and WHAT A GREAT PIECE OF WORK ! Its amazing code.. thanks a lot !

murchelon avatar May 08 '20 22:05 murchelon

@murchelon Did you manage to get past this error? I found that you need to create a subdirectory named "crypto" and copy all the code except for main.py and then it works.

pepper-live avatar Aug 11 '20 18:08 pepper-live