Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

deviantart check: AttributeError: 'NoneType' object has no attribute 'startswith' #10

Closed
HLFH opened this issue Jan 3, 2021 · 2 comments

Comments

@HLFH
Copy link

HLFH commented Jan 3, 2021

Hi,

I am getting this error:

  File "/home/hlfh/searx-checker/checker/checker.py", line 228, in <module>
    main(args.url, args.o)
  File "/home/hlfh/searx-checker/checker/checker.py", line 215, in main
    state = check_engines_state(instance_url, engines)
  File "/home/hlfh/searx-checker/checker/checker.py", line 168, in check_engines_state
    provides_results = _request_results(instance_url, engine)
  File "/home/hlfh/searx-checker/checker/checker.py", line 156, in _request_results
    engine_result = _query_engine_result(instance_url, engine, query)
  File "/home/hlfh/searx-checker/checker/checker.py", line 146, in _query_engine_result
    return _check_response(resp)
  File "/home/hlfh/searx-checker/checker/checker.py", line 132, in _check_response
    return _check_results(resp_json['results'])
  File "/home/hlfh/searx-checker/checker/checker.py", line 86, in _check_results
    if not _check_result(result):
  File "/home/hlfh/searx-checker/checker/checker.py", line 78, in _check_result
    return _is_url_image(result.get('thumbnail_src'))
  File "/home/hlfh/searx-checker/checker/checker.py", line 42, in _is_url_image
    if image_url.startswith('//'):
AttributeError: 'NoneType' object has no attribute 'startswith'

Shall I try this PR searx/searx#2419, and test the install on my Arch Linux server?

Thanks,
HLFH

@dalf
Copy link

dalf commented Jan 4, 2021

Thank you for the report.

The PR searx/searx#2419 has a safety net: https://github.com/searx/searx/pull/2419/files#diff-925edb9d1417a996f7a804484dff825ba9e5b469378413d77df55712c650f6e0R55-R56

For now:

@dalf dalf closed this as completed Jan 4, 2021
@dalf dalf reopened this Jan 4, 2021
@HLFH
Copy link
Author

HLFH commented Jan 5, 2021

@dalf Thanks. I tested the PR and it works. searx/searx#2419 (comment)
Best to archive this repo?
Closing in favour of searx/searx#2419.

@HLFH HLFH closed this as completed Jan 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants