HELP A NOOB TO START!
-
I am using Pycharm withy a Python 3.6 interpreter and getting this import error upon building:
import datetime
import backtrader as bt
import backtrader.feeds as btfeeddata = btfeed.GenericCSVData(
dataname='coinbase.csv',fromdate=datetime.datetime(2000, 1, 1), todate=datetime.datetime(2000, 12, 31), nullvalue=0.0, dtformat=('%Y-%m-%d'), datetime=0, high=1, low=2, open=3, close=4, volume=5, openinterest=-1
)
Traceback (most recent call last):
File "/Users/hoffert/Desktop/Python/Backtest/backtrader.py", line 2, in <module>
import backtrader as bt
File "/Users/hoffert/Desktop/Python/Backtest/backtrader.py", line 3, in <module>
import backtrader.feeds as btfeed
ImportError: No module named feedsProcess finished with exit code 1
What should I do? Many thanks.
-
The best way to let the NOOB tag behind onself is to 1st read what one has before the eyes, specifically at the top of each and every page of the community.
For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Formatting is key to let others see more clearly what's happening and therefore be able to interact with you.
As for your error, this is a common rookie mistake (every Python programmer has for sure made it)
- Don't name your script with the same name as the library you want to work with. Because your script doesn't contain any module named
feeds
- Don't name your script with the same name as the library you want to work with. Because your script doesn't contain any module named