I am getting the error ImportError: cannot import name 'plot' from 'plot'
, and I don't know how to fix it. I believe it's tied to the import that I'm using; chart.
Full traceback (if that helps):
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\bot.py", line 606, in _load_from_module_spec
spec.loader.exec_module(lib)
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "c:\Users\User\Downloads\Stock Bot\Different Bot Code\Stock\stock-master-master\cogs\charts.py", line 13, in <module>
import charts as c
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\charts\__init__.py", line 5, in <module>
from plot import plot, plotasync, line, area, spline, pie
ImportError: cannot import name 'plot' from 'plot' (C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\plot\__init__.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\Users\User\Downloads\Stock Bot\Different Bot Code\Stock\stock-master-master\bot.py", line 32, in <module>
bot.load_extension(f"cogs.{filename[:-3]}")
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\bot.py", line 678, in load_extension
self._load_from_module_spec(spec, name)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\bot.py", line 609, in _load_from_module_spec
raise errors.ExtensionFailed(key, e) from e
discord.ext.commands.errors.ExtensionFailed: Extension 'cogs.charts' raised an error: ImportError: cannot import name 'plot' from 'plot' (C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\plot\__init__.py)
I've seen a couple of threads discussing this issue, but none of them (from what I've seen) provide a sustainable fix. Anyone know a fix?