RestSharp GET请求始终返回内部服务器错误

时间:2019-12-06 22:24:02

标签: c# api restsharp

我正在尝试使用RestSharp向BrickLink API发送请求,但是我仍然收到以下错误。

2019-12-06 14:11:15,792: ERROR  werkzeug:   Error on request:
Traceback (most recent call last):
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\venv\Lib\site-packages\werkzeug\serving.py", line 270, in run_wsgi
    execute(self.server.app)
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\venv\Lib\site-packages\werkzeug\serving.py", line 258, in execute
    application_iter = app(environ, start_response)
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\venv\Lib\site-packages\flask\app.py", line 1997, in __call__
    return self.wsgi_app(environ, start_response)
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\venv\Lib\site-packages\flask\app.py", line 1985, in wsgi_app
    response = self.handle_exception(e)
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\venv\Lib\site-packages\flask\app.py", line 1540, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\venv\Lib\site-packages\flask\app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\venv\Lib\site-packages\flask\app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\venv\Lib\site-packages\flask\app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\venv\Lib\site-packages\flask\app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\venv\Lib\site-packages\flask\app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\venv\Lib\site-packages\flask_login.py", line 792, in decorated_view
    return func(*args, **kwargs)
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\web\pgadmin\misc\bgprocess\__init__.py", line 62, in index
    return make_response(response=BatchProcess.list())
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\web\pgadmin\misc\bgprocess\processes.py", line 571, in list
    IS_PY2 and hasattr(p.desc, 'encode') else loads(p.desc)
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\venv\lib\pickle.py", line 1388, in loads
    return Unpickler(file).load()
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\venv\lib\pickle.py", line 864, in load
    dispatch[key](self)
  File "C:\Program Files\PostgreSQL\10\pgAdmin 4\venv\lib\pickle.py", line 892, in load_proto
    raise ValueError, "unsupported pickle protocol: %d" % proto
ValueError: unsupported pickle protocol: 3
�����������������������������������

我已经在Postman中测试了相同的请求,并且一切正常。这是我的代码。

"{\"meta\":{\"description\":\"INTERNAL_SERVER_ERROR\",\"message\":\"INTERNAL_SERVER_ERROR\",\"code\":500}}"

我分别用KEY和TOKEN替换了我的Oauth密钥和令牌。

感谢您的回答和评论。

0 个答案:

没有答案