Closed ueffel closed 3 years ago
Thanks for the input! I'll look at fixing these within the next couple days.
same error here. Not working when multiword search.
18:10:39.972 StackOverflow.StackOverflow: multiline rstudio
18:10:39.987 ** ERROR: StackOverflow.StackOverflow: Could not send request: URL can't contain control characters. '/2.2/search?site=stackoverflow&order=desc&sort=activity&pagesize=10&intitle=multiline rs' (found at least ' ')
18:10:39.987 ** ERROR: Error from StackOverflow.StackOverflow.on_suggest: <class 'UnboundLocalError'>: local variable 'response' referenced before assignment
Traceback (most recent call last):
File "C:\Users\joe\Programs\Keypirinha\portable\Profile\InstalledPackages\StackOverflow.keypirinha-package\stackoverflow.py", line 50, in on_suggest
File "C:\Users\joe\Programs\Keypirinha\portable\Profile\InstalledPackages\StackOverflow.keypirinha-package\stackoverflow.py", line 68, in get_query
It's been a while since I've worked on this plugin haha, but thanks for the input. I'm going to merge the open PR since it contains some essential fixes and we can work on any further issues from there.
I'm getting an error if I search for example "python dict" (or any search term with a space in it)
As I am a developer myself, a few implementation hints:
urllib_opener
just once at start up time and keep the instance in class variable and only rebuild it, if net options of keypirinha are changed (on_event(flags)
withkp.Events.NETOPTIONS
inflags
)Accept-Encoding: gzip
in your request and you blindly try to decompress. You should check for theContent-Encoding
response headerKEYWORD
constant yet (you probably wanted to use this as catalog_item targetEdit: Oh yeah a and you don't need the keypirinha-package file as committed file. The keypirinha-package in the release section is sufficient.