Skip to content
Sign upLog in
← Back to Community

ModuleNotFoundError

Profile icon
JazzKeyboards

I'm not sure how to deal with this error. I loaded the alpha-vantage package. Yet if I typed in alpha-vantage as a part of the statement a syntax error occurs. So, I typed in alphavantage instead. This is what happened:

Traceback (most recent call last):
File "main.py", line 3, in
from alphavantage.timeseries import TimeSeries
ModuleNotFoundError: No module named 'alphavantage.timeseries'

Voters
Profile icon
JazzKeyboards
Comments
hotnewtop
Profile icon
Billie34

I've never had this error before, sorry I couldn't solve it. I will try to find out more. Besides, phoodle if you have found the answer, please reply below

Profile icon
hamzamaqsood3

If you would like to how to get fiberglass out of skin talk about Halo, you can, but not on Repl Talk (which is mostly for programming-related things). If you'd like to talk about it, feel free to on the Repl.it Discord server

Profile icon
JazzKeyboards

After deleting line 3 this is what the output looks like:

Repl.it: Updating package configuration

--> python3 -m poetry install
Installing dependencies from lock file

Package operations: 11 installs, 12 updates, 0 removals

  • Updating cffi (1.14.2 -> 1.14.3)
  • Installing crashtest (0.3.1)
  • Updating cryptography (3.1 -> 3.1.1)
  • Updating pastel (0.2.0 -> 0.2.1)
  • Updating attrs (20.1.0 -> 20.2.0)
  • Updating clikit (0.4.3 -> 0.6.2)
  • Installing distlib (0.3.1)
  • Installing filelock (3.0.12)
  • Installing iso8601 (0.1.13)
  • Installing pytz (2020.1)
  • Updating aiohttp (3.6.2 -> 3.6.3)
Profile icon
FishballNooodle

Replace line 3 with: Timeseries = alphavantage.timeseries.TimeSeries
And call the function like : Timeseries()

Profile icon
JazzKeyboards

@FishballNooodle
I think you misread the statement. It's not an assignment statement. But if I understand you correctly you say that I should replace, from alphavantage.timeseries import TimeSeries with Timeseries()

Profile icon
FishballNooodle

@JazzKeyboards

It technically is an assignment statement cos you can't import it normally.
Also U can just use the base module instead but you wanted something shorter

Profile icon
[deleted]

Copy this into the terminal (the black space where your program runs):

git clone https://github.com/RomelTorres/alpha_vantage.git pip install -e alpha_vantage

Hopefully that would work

Profile icon
JazzKeyboards

@CarlosRosiles
I'll certainly try it out. I'm a little surprised that you're saying that I should use the interactive window. Still I will use the code in the prescribed manner. Thank you.

Profile icon
JazzKeyboards

@CarlosRosiles
unfortunately there were immediate errors when I did that

Profile icon
[deleted]
Profile icon
elipie

you probably misspelled the module, or it does not exist, look the module up on google to see the spelling.

Profile icon
JazzKeyboards

@elipie
in fact, the alpha-vantage package does exist. When opening a script window to write a program, one need only click the box icon in the sidebar on the left. It is listed. So, there must be something that I'm missing syntactically in the importation

Profile icon
JazzKeyboards

@elipie
I need to append what I said before this is in fact what the error reads, ModuleNotFoundError: No module named 'alphavantage.timeseries'