I'm trying to import a JSON file in python but I keep running into an error
with open('e:\0_1export.json', 'r') as f:
data = f.read().strip();
Error message:
ValueError Traceback (most recent call last)
<ipython-input-40-abd9cb3a729a> in <module>()
----> 1 with open('e:\0_1export.json', 'r') as f:
2 data = f.read().strip();
ValueError: embedded null character
Here is the pastebin of the contents of the file i am trying to import .
https://pastebin.com/mCZiPktJ
Any help is appreciated!
'e:\0_1export.json' must be written as 'e:\\0_1export.json' or r'e:\0_1export.json'. Otherwise, Python treats '\0' as a NULL character (the character with the code 0).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With