-
Notifications
You must be signed in to change notification settings - Fork 381
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
Expecting value: line 1 column 1 (char 0) #615
Comments
I have the same problem |
same problem here, response 403 forbiden. |
same problem. |
Same! |
@alvarobartt thanks for the update. Really appreciate all the work you have done and what you have made possible thusfar! |
I've gotten the economic_calendar module working again by using the library cfscraper, and using that to make requests by adding |
@jazz-g |
@jazz-g Thanks, but when I tried this I am requested for a license key. |
Hi! What a great community we have, thanks for the solution. @normanvdmeijden I believe you're importing the wrong module, it's supposed to be crscrape (not crscraper) |
i need a little bit of help here. |
@varshasahasrabuddhe You need to modify the investpy package (in this case the news.py file) with the code @jazz-g suggested |
Thank you Lontaren and @jazz-g |
Thanks a ton! 🥇 this solved my issue :) |
Hi guys,
Yesterday I could retrieve the calender info with any issues, trying it this morning (same code), I received the following error below.
How can I fix this?
Traceback (most recent call last):
File "C:\Users\vanderMeijden\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\vanderMeijden\Desktop\EIA\EIACalender", line 28, in
calender = investpy.news.economic_calendar(from_date="19/10/2022", to_date="21/10/2022")
File "C:\Users\vanderMeijden\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\investpy\news.py", line 251, in economic_calendar
root = fromstring(req.json()["data"])
File "C:\Users\vanderMeijden\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Thanks,
Norman
The text was updated successfully, but these errors were encountered: