oanda / oandapy

Python wrapper for the OANDA REST API
MIT License
321 stars 147 forks source link

Import Error in python2.7: Attempted relative import in non-package #42

Open beyondwait opened 7 years ago

beyondwait commented 7 years ago

import oandapy File "C:\Python27\Lib\site-packages\oandapy\oandapy.py", line 3, in Traceback (most recent call last): File "", line 1, in from .exceptions import BadEnvironment, OandaError ValueError: Attempted relative import in non-package

hootnot commented 7 years ago

@beyondwait Hi, I've create PR #43 from which I think it should solve your import issues.

I can't test it myself since I do not use windows. Using python 2.7 on linux this issue does not occur.

Please check it out.