Kaustav Roy
Kaustav Roy

Reputation: 59

Not able to comprehend the error from httpie call

I am trying to call this API from the python console and getting the following error. I have tried reinstalling the Httpie package, but in vain. I can't comprehend the error. What might cause this error? Any help will be truly helpful. I am using python 3.x in a windows server environment. Thanks!

C:\Users\CXXXXX>http --auth-type=veracode_hmac "https://analysiscenter
.veracode.com/api/5.0/getappinfo.do" "app_id=="%1 > getappinfo.xml
Traceback (most recent call last):
  File "d:\python38-32\lib\site-packages\httpie\config.py", line 47, in load
    data = json.load(f)
  File "d:\python38-32\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "d:\python38-32\lib\json\__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "d:\python38-32\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "d:\python38-32\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 "d:\python38-32\lib\runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "d:\python38-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\Python38-32\Scripts\http.exe\__main__.py", line 9, in <module>
  File "d:\python38-32\lib\site-packages\httpie\__main__.py", line 11, in main
    sys.exit(main())
  File "d:\python38-32\lib\site-packages\httpie\core.py", line 193, in main
    if env.config.default_options:
  File "d:\python38-32\lib\site-packages\httpie\context.py", line 84, in config
    self._config.load()
  File "d:\python38-32\lib\site-packages\httpie\config.py", line 96, in load
    super(Config, self).load()
  File "d:\python38-32\lib\site-packages\httpie\config.py", line 49, in load
    raise ValueError(
ValueError: Invalid Config JSON: Expecting value: line 1 column 1 (char 0) [\\ci
fs.nas1.us2.experian.corp\CitrixUPM\Folders\C63639A\AppData\Roaming\\httpie\conf
ig.json]

Upvotes: 0

Views: 496

Answers (1)

Kaustav Roy
Kaustav Roy

Reputation: 59

hank you for pointing to the JSON. It solved the problem. I think some how the json got corrupted. I deleted the json and rerun the command and it worked.

Upvotes: 1

Related Questions