question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: InvalidSchema exception thrown when running howdoi

See original GitHub issue

Steps to reproduce:

howdoi add two numbers

Traceback:

  File "/usr/bin/howdoi", line 12, in <module>
    sys.exit(command_line_runner())
  File "/usr/lib/python3.9/site-packages/howdoi/howdoi.py", line 717, in command_line_runner
    utf8_result = howdoi(args).encode('utf-8', 'ignore')
  File "/usr/lib/python3.9/site-packages/howdoi/howdoi.py", line 590, in howdoi
    res = _get_answers(args)
  File "/usr/lib/python3.9/site-packages/howdoi/howdoi.py", line 420, in _get_answers
    answer = _get_answer(args, question_links)
  File "/usr/lib/python3.9/site-packages/howdoi/howdoi.py", line 342, in _get_answer
    page = _get_result(link + '?answertab=votes')
  File "/usr/lib/python3.9/site-packages/howdoi/howdoi.py", line 184, in _get_result
    return howdoi_session.get(url, headers={'User-Agent': _random_choice(USER_AGENTS)},
  File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 649, in send
    adapter = self.get_adapter(url=request.url)
  File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 742, in get_adapter
    raise InvalidSchema("No connection adapters were found for {!r}".format(url))
requests.exceptions.InvalidSchema: No connection adapters were found for '/url?esrc=s&amp;q=&amp;rct=j&amp;sa=U&amp;url=https://stackoverflow.com/questions/51638803/adding-two-numbers-with-using-only-one-variable-in-c/51638994&amp;ved=2ahUKEwiqpZazoIfvAhU-FTQIHUMnBPYQFjAAegQIARAB&amp;usg=AOvVaw3RDuPqdRPSft0WwS10O_py?answertab=votes'

Python version: Python 3.9.2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
langdoncommented, Mar 9, 2021

Ohh good gracious… I thought I tried that. All better!

0reactions
gleitzcommented, Mar 9, 2021

@langdon please clear your cache with -C and the error should go away. This is related to https://github.com/gleitz/howdoi/issues/355 and will be fixed in a future release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Requests - No connection adapters - Stack Overflow
My exact error message: 741 # Nothing matches :-/ --> 742 raise InvalidSchema("No connection adapters were found for {!r}".format(url)) 743 744 def ...
Read more >
Bug when running programme · Issue #685 · google/codeworld
When the programme compiles, before it runs successfully , I see this exception error on my local build. Compiling...uncaught exception in ...
Read more >
exception thrown when running test on multiple agents in ...
When running, the first agent worked fine, while the other agents all failed with exception thrown: Failure attempting to call the restapis System....
Read more >
Why not use the word bug instead of exception? [closed]
An application might silently discard data you enter instead of storing it in its database; no exception gets thrown, but it is still...
Read more >
Bug List
FindException: Module <module-name> not found" when running a test class ... can be thrown; an exception type must be a subclass of Throwable"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found