Backtrader, oandapy and OandaError issues
Jammawind last edited by
I am having trouble with importing backtrader as bt. I currently have Python 3.7.3 on my pc. I am stuck here:
import backtrader as bt
I get the following error:
~Anaconda3\kub\site-packages\stores\oandastotre.py in <module>
39 # Extend the exception to support extras cases
41 class OandaRequestError(oandapy.OandaError):
42 def init(self):
43 er = dict(code=599, message='Request Error', description=' ')
AttributeError: module 'oandapy' has no attribute 'OandaError'
I have tried to uninstall the packages multiple times. backtrader was working for me until i updated to the current version. Is there a package that I am missing and how do I get it back working.
I have been working with the program for a while with no issues and I do not know how to fix this issue.
Your problem is that you have upgraded
oandapyto something which isn't what's needed.
elihubogan last edited by
I'm having the same problem as @Jammawind - current version of oandapy is 0.0.9, I tried reinstalling previous versions of oandapy (0.0.8, 0.0.7, 0.0.5 (no 6 for some reason), and so on), but got the same error for all.
The oandapy repo shows the OandaError attribute in the current version, so not sure what's going on.
@backtrader can't make much progress in the QuickStart if the module won't load. Thanks! :)
Let me venture into the crystall ball territory ... you did
pip install oandapy
(Yes I know, my crystal ball is incredible ... but it doesn't work with lottery numbers unfortunately)
The documentation explicitly states (Docs - Oanda)
pip install git+https://github.com/oanda/oandapy.git
Hopefully you see the difference. Furthermore, you are installing something for
Oanda REST v20which isn't supported by the built-in functionality.
That's why another part of the website lists 3rd party resources such as
can't make much progress in the QuickStart if the module won't load
The Quickstart doesn't reference Oanda.
tomguilfoyle last edited by
I made the same mistake and I'm unable to uninstalll oandapy or install the correct package from git. Any ideas on what to do?
Find the directory where your python packages are installed, delete the wrong
oandapyand proceed to install again.