Python Forum
json with regex script snagging
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
json with regex script snagging
#3
(Jan-31-2018, 05:27 PM)metulburr Wrote: There should be a error type after your error that you are missing. What kind of traceback are you getting?

Nope. here's the traceback in its entirety: Huh
Quote:Traceback (most recent call last):
File "pwkpr0.py", line 69, in <module>
pull_file()
File "pwkpr0.py", line 37, in pull_file
file_contents = json.load(f)
File "/usr/lib/python3.6/json/__init__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Can I infer that my 'logic' here is ok at least? file_contents = json.load(f) causes a problem which I can't figure out, but you guys are also having a tiny bit of difficulty with it as well Big Grin Big Grin . I guess I'm running into 'pretty good' (aka thought provoking) problems?

I'm pretty much stuck. I feel this _should_ work...
Reply


Messages In This Thread
json with regex script snagging - by mepyyeti - Jan-31-2018, 03:45 PM
RE: json with regex script snagging - by metulburr - Jan-31-2018, 05:27 PM
RE: json with regex script snagging - by mepyyeti - Jan-31-2018, 07:50 PM
RE: json with regex script snagging - by metulburr - Jan-31-2018, 08:13 PM
RE: json with regex script snagging - by mepyyeti - Jan-31-2018, 08:32 PM
RE: json with regex script snagging - by snippsat - Jan-31-2018, 09:12 PM
RE: json with regex script snagging - by mepyyeti - Feb-03-2018, 12:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to generating multiple json files using python script dzgn989 4 271 May-10-2024, 03:09 PM
Last Post: deanhystad
  Python Script to convert Json to CSV file chvsnarayana 8 2,639 Apr-26-2023, 10:31 PM
Last Post: DeaD_EyE
  Match key-value json,Regex saam 5 5,520 Dec-07-2021, 03:06 PM
Last Post: saam
  regex on json file senaint 12 16,292 May-06-2020, 04:16 AM
Last Post: buran
  [split] script: remove all "carriage return" from my json variable pete 2 2,864 May-05-2020, 03:22 PM
Last Post: deanhystad
  Regex to retrieve data from json in script tag. DreamingInsanity 4 9,659 Dec-20-2019, 06:18 PM
Last Post: DreamingInsanity
  script: remove all "carriage return" from my json variable mfran2002 4 11,329 Feb-20-2019, 05:07 AM
Last Post: mfran2002
  Issue with a script to convert xls to json Will86 2 3,875 Dec-19-2018, 08:23 AM
Last Post: Will86
  Looking for csv to json convertion script rajaniyer123 1 2,913 Jul-06-2017, 10:42 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020