简体   繁体   English

无法理解来自 httpie 调用的错误

[英]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.我试图从 python 控制台调用此 API 并收到以下错误。 I have tried reinstalling the Httpie package, but in vain.我试过重新安装 Httpie 包,但没有成功。 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.我在 Windows 服务器环境中使用 python 3.x。 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]

hank you for pointing to the JSON.感谢您指向 JSON。 It solved the problem.它解决了这个问题。 I think some how the json got corrupted.我想一些 json 是如何损坏的。 I deleted the json and rerun the command and it worked.我删除了 json 并重新运行命令并且它起作用了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM