中文介绍
requests.exceptions.JSONDecodeError
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last)
File "D:\app\miniconda3\envs\crawl\lib\site-packages\requests\models.py", line 971, in
json
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
return complexjson.loads(self.text, **kwargs)
except JSONDecodeError as e:
# Catch JSON-related errors and raise as requests.JSONDecodeError
# This aliases json.JSONDecodeError and simplejson.JSONDecodeError
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
File "D:\app\miniconda3\envs\crawl\lib\site-packages\simplejson\__init__.py", line 525, in
loads
"""
if (cls is None and encoding is None and object_hook is None and
parse_int is None and parse_float is None and
parse_constant is None and object_pairs_hook is None
and not use_decimal and not kw):
return _default_decoder.decode(s)
if cls is None:
cls = JSONDecoder
if object_hook is not None:
kw['object_hook'] = object_hook
if object_pairs_hook is not None:
File "D:\app\miniconda3\envs\crawl\lib\site-packages\simplejson\decoder.py", line 370, in
decode
instance containing a JSON document)
"""
if _PY3 and isinstance(s, bytes):
s = str(s, self.encoding)
obj, end = self.raw_decode(s)
end = _w(s, end).end()
if end != len(s):
raise JSONDecodeError("Extra data", s, end, len(s))
return obj
File "D:\app\miniconda3\envs\crawl\lib\site-packages\simplejson\decoder.py", line 400, in
raw_decode
ord0 = ord(s[idx])
if ord0 == 0xfeff:
idx += 1
elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
idx += 3
return self.scan_once(s, idx=_w(s, idx).end())
- During handling of the above exception, another exception occurred:
File "D:\app\miniconda3\envs\crawl\lib\site-packages\flask\app.py", line 2091, in
__call__
def __call__(self, environ: dict, start_response: t.Callable) -> t.Any:
"""The WSGI server calls the Flask application object as the
WSGI application. This calls :meth:`wsgi_app`, which can be
wrapped to apply middleware.
"""
return self.wsgi_app(environ, start_response)
File "D:\app\miniconda3\envs\crawl\lib\site-packages\flask\app.py", line 2076, in
wsgi_app
try:
ctx.push()
response = self.full_dispatch_request()
except Exception as e:
error = e
response = self.handle_exception(e)
except: # noqa: B001
error = sys.exc_info()[1]
raise
return response(environ, start_response)
finally:
File "D:\app\miniconda3\envs\crawl\lib\site-packages\flask\app.py", line 2073, in
wsgi_app
ctx = self.request_context(environ)
error: t.Optional[BaseException] = None
try:
try:
ctx.push()
response = self.full_dispatch_request()
except Exception as e:
error = e
response = self.handle_exception(e)
except: # noqa: B001
error = sys.exc_info()[1]
File "D:\app\miniconda3\envs\crawl\lib\site-packages\flask\app.py", line 1518, in
full_dispatch_request
request_started.send(self)
rv = self.preprocess_request()
if rv is None:
rv = self.dispatch_request()
except Exception as e:
rv = self.handle_user_exception(e)
return self.finalize_request(rv)
def finalize_request(
self,
rv: t.Union[ResponseReturnValue, HTTPException],
File "D:\app\miniconda3\envs\crawl\lib\site-packages\flask\app.py", line 1516, in
full_dispatch_request
self.try_trigger_before_first_request_functions()
try:
request_started.send(self)
rv = self.preprocess_request()
if rv is None:
rv = self.dispatch_request()
except Exception as e:
rv = self.handle_user_exception(e)
return self.finalize_request(rv)
def finalize_request(
File "D:\app\miniconda3\envs\crawl\lib\site-packages\flask\app.py", line 1502, in
dispatch_request
getattr(rule, "provide_automatic_options", False)
and req.method == "OPTIONS"
):
return self.make_default_options_response()
# otherwise dispatch to the handler for that endpoint
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
def full_dispatch_request(self) -> Response:
"""Dispatches the request and on top of that performs request
pre and postprocessing as well as HTTP exception catching and
error handling.
File "D:\work\python\pytools\crawl_post\translate_baidu_ai.py", line 151, in
translate
blocks = chunk_by_sentence(text, 5000)
else:
blocks.append(text)
result = []
for block in blocks:
res = baidu(block, frm, to)
result.append(res)
time.sleep(1)
return ''.join(result)
File "D:\work\python\pytools\crawl_post\translate_baidu_ai.py", line 109, in
baidu
# "q": text,
# }
#print(params, headers, data)
#return
response = get_url(url, params, None, headers)
res = response.json()
#print(res)
result = []
if 'result' in res:
for item in res.get('result').get('trans_result'):
result.append(item.get('dst'))
File "D:\app\miniconda3\envs\crawl\lib\site-packages\requests\models.py", line 975, in
json
try:
return complexjson.loads(self.text, **kwargs)
except JSONDecodeError as e:
# Catch JSON-related errors and raise as requests.JSONDecodeError
# This aliases json.JSONDecodeError and simplejson.JSONDecodeError
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
@property
def links(self):
"""Returns the parsed header links of the response, if any."""
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
This is the Copy/Paste friendly version of the traceback.
Console Locked
The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server.
英文介绍
The Federal University of Viçosa (UFV) is based in the state of Minas Gerais in Brazil. What began as a Higher College of Agriculture and Veterinary Science in 1922 is now a federal university – and has been since 1969 – based in the city of Viçosa. UFV is consistently ranked well when compared to other universities in Brazil.
This region is best known for its industrial development, and represents the most important economic region of Brazil offering plenty of opportunities for the universities tech graduates.
It is now a technical university which offers courses in engineering, agronomy, veterinary medicine, animal husbandry, and many other science related areas.
The university is spread across three separate campuses: Viçosa, Florestal and Rio Paranaíba. Each concentrates and offers specific courses, for instance Viçosa offers courses in a vast array of areas of the human knowledge while Rio Paranaíba offers specialised degrees such as vegetable production.
The UFV offers a wide range of services on each campus which includes laboratories, forest reserves, a library, sports and leisure areas, restaurants, banks, and medical services.
There are plenty of opportunities for exchange programmes, as the university has agreements in place with approximately 100 institutions from 24 different countries.
The UFV is also part of the Innovation Network created by the 100,000 Strong in the Americas initiative – a recent program designed to increase the number of U.S. students studying in the Western Hemisphere to 100,000, and the number of Western Hemisphere students studying in the United States to 100,000 by 2020.
科目
艺术与人文
- 建筑
- 历史、哲学和神学
- 艺术、表演艺术与设计
- 语言、文学与语言学
社会科学
- 传播与媒体研究
- 社会学
- 地理
- 政治与国际研究(包括发展研究)
临床、临床前和健康
- 医学和牙科
- 其他健康
心理学
- 心理学
生命科学
- 体育科学
- 兽医学
- 农业和林业
- 生物科学
计算机科学
- 计算机科学
教育
- 教育
工程与技术
- 化学工程
- 电气与电子工程
- 机械与航空航天工程
- 通用工程
- 土木工程
商业与经济
- 经济与计量经济学
- 商业与管理
- 会计与财务
物理科学
- 地质、环境、地球和海洋科学
- 数学与统计学
- 化学
- 物理学与天文学
定律
- 定律
科目(英文)
Arts & humanities
- Architecture
- History, Philosophy & Theology
- Art, Performing Arts & Design
- Languages, Literature & Linguistics
Social sciences
- Communication & Media Studies
- Sociology
- Geography
- Politics & International Studies (incl Development Studies)
Clinical, pre-clinical & health
- Medicine & Dentistry
- Other Health
Psychology
- Psychology
Life sciences
- Sport Science
- Veterinary Science
- Agriculture & Forestry
- Biological Sciences
Computer science
- Computer Science
Education
- Education
Engineering & technology
- Chemical Engineering
- Electrical & Electronic Engineering
- Mechanical & Aerospace Engineering
- General Engineering
- Civil Engineering
Business & economics
- Economics & Econometrics
- Business & Management
- Accounting & Finance
Physical sciences
- Geology, Environmental, Earth & Marine Sciences
- Mathematics & Statistics
- Chemistry
- Physics & Astronomy
Law
- Law