howdoi icon indicating copy to clipboard operation
howdoi copied to clipboard

Sorry, couldn't find any help with that topic?

Open tassosblackg opened this issue 5 years ago • 51 comments

howdoi version 2.0.14 gives this error no matter what search string I type

for example : howdoi format date bash

Throughs = "Sorry, couldn't find any help with that topic?"

tassosblackg avatar Apr 07 '21 09:04 tassosblackg

Same version, same problem.

Edit: Also having a similar issue with the VSCode extension, it returns an empty string when plugged into the command palette.

kingpitka avatar Apr 07 '21 10:04 kingpitka

Running _sanity_check() with no arguments also gives me:

Cache cleared successfully Traceback: Line 645, in _sanity_check asset howdoi(google_args).encode('utf-8', 'ignore') != error_result AssertionError Line 647, in _sanity_check Raise GoogleValidationError from exc howdoi.errors.GoogleValidationError

kingpitka avatar Apr 07 '21 12:04 kingpitka

When this happens, I usually try two things: clearing the cache and potentially switching to another search engine if you think you've been rate limited.

howdoi format date bash -C
howdoi format date bash -e bing

Give those a try and let me know if either works for you.

gleitz avatar Apr 07 '21 14:04 gleitz

Same issue here. WSL (Ubuntu 18.04 LTS).

image

Also, the VSCode extension returns an empty result.

sunnysonx avatar Apr 07 '21 17:04 sunnysonx

Neither command changed the results, sorry to say. Any diagnostic steps we could try running, besides the sanity check?

kingpitka avatar Apr 07 '21 20:04 kingpitka

Thanks for the update. There's an experimental --explain endpoint that is being built in https://github.com/gleitz/howdoi/pull/344

If you don't mind checking out that branch and running

python -m howdoi.howdoi format date bash -C --explain

That might give some more insight into what is being blocked.

gleitz avatar Apr 07 '21 20:04 gleitz

Okay, after checking #344 out and running:

>py -m howdoi.howdoi format date bash -C --explain
INFO: Version: 2.0.13
Cache cleared successfully
INFO: Fetching answers for query: format date bash
Sorry, couldn't find any help with that topic
(use --explain to learn why)

Seems like if --explain is tacked on, the reminder text at the end could be omitted. But still not working, sadly.

Edit: Submitted a pull request fixing a couple small typos and omitting the --explain reminder if you've already run howdoi with --explain. Still haven't figured out why we aren't getting any results, though.

kingpitka avatar Apr 08 '21 08:04 kingpitka

Tried running howdoi on a different computer, different network, same result. Tried running pysimplegui-howdoi and WebDoI, same result. Definitely feeling a little haunted at this point.

kingpitka avatar Apr 08 '21 15:04 kingpitka

Thanks for testing that. Does DDG fail as well?

howdoi format date bash -e duckduckgo

@KimaruThagna is working on a new version of the explainability that I'd like to use to see if we can debug this very puzzling issue. It's here -> https://github.com/gleitz/howdoi/pull/359

gleitz avatar Apr 08 '21 15:04 gleitz

@kingpitka that is spooooky. Let's see if we can get this explainability PR in a good place and use this situation as its first test.

Can you access StackOverflow? Do you use a proxy or any kind of VPN?

gleitz avatar Apr 08 '21 15:04 gleitz

@kingpitka that is spooooky. Let's see if we can get this explainability PR in a good place and use this situation as its first test.

Here's hoping, I absolutely love the idea of this program and hope to get it working soon. To add another level of complexity, "howdoi format date bash" works fantastically. Both with DuckDuckGo and the default engine.

Can you access StackOverflow? Do you use a proxy or any kind of VPN?

Bit of an interesting situation, I've stripped my browser of internet access on this computer for a few less distractions (why howdoi sounds so ideal). All other programs can access things just fine, no proxy or VPN running, and requests connects immediately to StackOverflow. The browser situation shouldn't be bothering it at all.

kingpitka avatar Apr 08 '21 17:04 kingpitka

Oh, that's good to hear. So howdoi format date bash is working again? Are there queries that still aren't working?

howdoi definitely needs internet access to work - both to contact google and then get the answers from stackoverflow.

gleitz avatar Apr 08 '21 17:04 gleitz

Most other queries still aren't working.

Doesn't work: format time bash print hello world python for loop javascript exit vim for loop python rename master main github install package pip comment html

Works: format date bash push commit github

I'll add if I find any more.

kingpitka avatar Apr 08 '21 17:04 kingpitka

I have tried almost everything updating, upgrading, reinstall it in different machines using Ubuntu18.04 or Manjaro 20.2 but the same condition doesn't do anything. every time the same message "Sorry..." I've tried also everything that is mentioned above but not any progress!

tassosblackg avatar Apr 12 '21 12:04 tassosblackg

Sorry, that sounds puzzling. Two things I can think of off the top of my head: you're either not able to reach the search engine chosen or not able to reach Stackoverflow. @KimaruThagna is working on a PR that will provide the --explain endpoint and will tell you which of these is failing. When he is ready with that PR we will post it here so you can give it a try.

gleitz avatar Apr 12 '21 15:04 gleitz

Hi all - thanks for being patient as we try to figure out what is wrong.

I'd like to try our new explainability feature (https://github.com/gleitz/howdoi/pull/381) to see if we can track down the issue.

If you don't mind, try the following:

git clone https://github.com/gleitz/howdoi.git
git checkout origin/explainability-v2
python -m howdoi format date bash --explain -C

Here's the output I receive:

» python -m howdoi format date bash --explain -C
INFO: Version: 2.0.14
Cache cleared successfully
INFO: Fetching answers for query: format date bash
INFO: Searching google with URL: https://www.google.com/search?q=site:stackoverflow.com%20format%20date%20bash&hl=en
INFO: stackoverflow.com links found on google: 1
INFO: Answers requested: 1, Starting at position: 1
INFO: Total answers returned: 1
# put current date as yyyy-mm-dd in $date
# -1 -> explicit current date, bash >=4.3 defaults to current time if not provided
# -2 -> start time for shell
printf -v date '%(%Y-%m-%d)T\n' -1

# put current date as yyyy-mm-dd HH:MM:SS in $date
printf -v date '%(%Y-%m-%d %H:%M:%S)T\n' -1

# to print directly remove -v flag, as such:
printf '%(%Y-%m-%d)T\n' -1
# -> current date printed to terminal

Hopefully the output will help us track down this spooky issue! 👻

gleitz avatar Apr 14 '21 15:04 gleitz

I've tried to follow the above comment's step @gleitz to check and debug the issue

but when I've tried to run python -m howdoi format date bash --explain -C

I got a syntax error

` Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 163, in _run_module_as_main mod_name, _Error)

File "/usr/lib/python2.7/runpy.py", line 119, in _get_module_details code = loader.get_code(mod_name)

File "/usr/lib/python2.7/pkgutil.py", line 281, in get_code self.code = compile(source, self.filename, 'exec')

File "/home/tassos/howdoi/howdoi/howdoi.py", line 129 raise self.exception() from value_error -------------------------------- ^

SyntaxError: invalid syntax`

pointer is at (m) letter of from check the previous and after that lines, I didn't find something wrong?! Or did I missed something? weird? Or 'smelling' something wrong with python2.7 ? I tested on Ubuntu18.04

tassosblackg avatar Apr 14 '21 17:04 tassosblackg

Sorry, I should have mentioned that we only support Python 3.

gleitz avatar Apr 14 '21 17:04 gleitz

So, the command should be changed too python3 -m howdoi format date bash --explain -C

This is the output after running it with python3

INFO: Version: 2.0.14
Cache cleared successfully
INFO: Fetching answers for query: format date bash
INFO: Searching google with URL: https://www.google.com/search?q=site:stackoverflow.com%20format%20date%20bash&hl=en
INFO: Search engine found no StackOverflow links
Sorry, couldn't find any help with that topic% 

tassosblackg avatar Apr 14 '21 17:04 tassosblackg

Same result, except my cache clear looks slightly different:


py.exe -m howdoi format date bash --explain -C
INFO: Version: 2.0.14
←[92mCache cleared successfully←[0m
INFO: Fetching answers for query: format date bash
INFO: Searching google with URL: https://www.google.com/search?q=site:stackoverflow.com%20format%20date%20bash&hl=en
INFO: Search engine found no StackOverflow links
Sorry, couldn't find any help with that topic

kingpitka avatar Apr 14 '21 18:04 kingpitka