phamdinhkhanh / vnquant

VietNam Data Stock Market Price
388 stars 180 forks source link

ModuleNotFoundError: No module named 'src' #1

Closed tanduong closed 5 years ago

tanduong commented 5 years ago

First of all, thank you for the package.

I tried with your example code

import vnquant.DataLoader as web
loader = web.DataLoader('VND', '2018-02-02','2018-04-02')
data = loader.download()
data.head()

and get this error:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-a817844cd804> in <module>()
----> 1 import vnquant.DataLoader as web
      2 loader = web.DataLoader('VND', '2018-02-02','2018-04-02')
      3 data = loader.download()
      4 data.head()

~/Code/python/vnquant/vnquant/DataLoader.py in <module>()
      1 from bs4 import BeautifulSoup
      2 import requests
----> 3 import src.utils as utils
      4 import pandas as pd
      5 import logging as logging

ModuleNotFoundError: No module named 'src'

Change

import src.utils as utils

to

import vnquant.utils as utils

will fix it.

phamdinhkhanh commented 5 years ago

Thanks for your finding. I fixed it.

HenryPhan commented 3 years ago

Mình dùng code dưới đây bị lỗi: from vnquant.DataLoader import DataLoader

DataLoader(symbols="VND", start="2018-01-10", end="2018-02-15", data_source="cafe", minimal=False)

data = DataLoader.download()

Lỗi: download() missing 1 required positional argument: 'self'

HenryPhan commented 3 years ago

Xin chào, Code này chạy bị lỗi: import vnquant.DataLoader as web loader = web.DataLoader('VND', '2018-02-02','2018-04-02') data = loader.download() data.head()

Lỗi: not enough values to unpack (expected 2, got 0)

phamdinhkhanh commented 3 years ago

Hi bạn,

Gần đây mình bận dự án quá nên chưa check được source code này. Bạn chịu khó download bằng ta nhé.

Best regards!

Phạm Đình Khánh

Vào 12:28, CN, 25 Th4, 2021 HenryPhan @.***> đã viết:

Xin chào, Code này chạy bị lỗi: import vnquant.DataLoader as web loader = web.DataLoader('VND', '2018-02-02','2018-04-02') data = loader.download() data.head()

Lỗi: not enough values to unpack (expected 2, got 0)

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/phamdinhkhanh/vnquant/issues/1#issuecomment-826260002, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFZC4RUCOBGGOXNZB3UXSG3TKOR6DANCNFSM4GZYANHQ .