valhallasw / plagiabot

MIT License
13 stars 6 forks source link

SyntaxError: invalid syntax on Earwigs copyvio tool #15

Closed josve05a closed 7 years ago

josve05a commented 7 years ago

On https://tools.wmflabs.org/copyvios/?lang=en&project=wikipedia&title=Kevin+Byard&oldid=&action=search&use_engine=0&use_links=0&turnitin=1 I get the following error

Traceback (most recent call last):
  File "/data/project/copyvios/www/python/src/app.py", line 38, in inner
    return func(*args, **kwargs)
  File "/data/project/copyvios/www/python/src/app.py", line 103, in index
    query = do_check()
  File "./copyvios/checker.py", line 38, in do_check
    _get_results(query, follow=not _coerce_bool(query.noredirect))
  File "./copyvios/checker.py", line 74, in _get_results
    query.turnitin_result = search_turnitin(page.title, query.lang)
  File "./copyvios/turnitin.py", line 22, in search_turnitin
    return TurnitinResult(_make_api_request(page_title, lang))
  File "./copyvios/turnitin.py", line 35, in _make_api_request
    parsed_api_result = literal_eval(result.text)
  File "/usr/lib/python2.7/ast.py", line 49, in literal_eval
    node_or_string = parse(node_or_string, mode='eval')
  File "/usr/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "", line 1
    Error encountered while handling the request. Please report a bug: https://github.com/valhallasw/plagiabot/issues
                    ^
SyntaxError: invalid syntax
eranroz commented 7 years ago

Fixed now. see details in: https://github.com/valhallasw/plagiabot/issues/14