Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

แจ้ง Error Function ThaiCovid19() #5

Open
ktanan opened this issue Mar 30, 2020 · 3 comments
Open

แจ้ง Error Function ThaiCovid19() #5

ktanan opened this issue Mar 30, 2020 · 3 comments

Comments

@ktanan
Copy link

ktanan commented Mar 30, 2020

สวัสดีครับ
แจ้ง Error Function ThaiCovid19()

D:\SourcePython\test1>covid19.py
Traceback (most recent call last):
File "D:\SourcePython\test1\covid19.py", line 14, in
thai = ThaiCovid19()
File "C:\Users\P2506039\AppData\Local\Programs\Python\Python37\lib\site-packages\covid19uncle\covid19.py", line 110, in ThaiCovid19
result['รักษาพยาบาลสังเกตอาการ'] = alldata[11][2]
IndexError: list index out of range

ปล.ผมมือใหม่เพิ่งหัดเขียน Python ครับ

@mrwan2546
Copy link
Contributor

Update ครับ

pip install covid19uncle==0.0.2

@korrio
Copy link

korrio commented Apr 1, 2020

แจ้ง error เพิ่มเติม

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/covid19uncle/covid19.py", line 104, in ThaiCovid19
    result['ผู้ป่วยกลับบ้านแล้ว'] = alldata[5][2]
IndexError: list index out of range

workaround: comment line 104
#result['ผู้ป่วยกลับบ้านแล้ว'] = alldata[5][2]

@korrio
Copy link

korrio commented Apr 1, 2020

คำแนะนำ
เนื่องจาก html เปลี่ยนบ่อยเลยอยากให้เช็ค null/undefined ก่อนอัดเข้า array ครับ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants