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.

Python returning no results for queries with %20 or whitespace.

See original GitHub issue

Your service returns no results for multi keyword searches using spaces or %20 for python.

Illustration: About a month ago I ran this query through curl:

curl cht.sh/python/exponential%20backoff
#  Exponential backoff: time.sleep with random.randint(0, 1000)
# .... etc etc.
#  [NPE] [so/q/27438273] [cc by-sa 3.0] 

But now your service returns the error: "Unknown cheat sheet"

curl cht.sh/python/exponential%20backoff
#  Unknown cheat sheet.
#  Please try to reformulate your query

$ curl "cht.sh/python/exponential backoff"
#  Unknown cheat sheet.
#  Please try to reformulate your query

Looks like I have to use plus only, instead of spaces, like this to get a response:

$ curl cht.sh/python/exponential+backoff
#  Exponential backoff: time.sleep with random.randint(0, 1000)
# .... etc etc.
#  [NPE] [so/q/27438273] [cc by-sa 3.0] 

Same occurs with browser, clicky: https://cheat.sh/python/exponential backoff

More examples of what used to return a helpful response from last month, but is not working now:

curl "cht.sh/python/exists dictionary"
curl "cht.sh/python/collapse+interior+spaces"
curl "cht.sh/python/octal example"
curl "cht.sh/python/deep copy"
curl "cht.sh/python/flush stdout print"
curl "cht.sh/python/lambda example"

clicky: https://cheat.sh/python/exists dictionary https://cheat.sh/python/lambda example https://cheat.sh/python/deep copy

All of these used to return a stackoverflow entry exists%20dictionary -> so/q/1602934 but now it returns “Unknown cheat sheet.”

It’s been like this for the last 48 hours or more. The mapping between %20 literal space, and + seems to be messed up somewhere in transit.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
chubincommented, May 14, 2020

Yes, I can acknowledge it. I will investigate

0reactions
dbeniaminecommented, May 21, 2020

Why not, I am oppening an issue for this feature

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use %20 instead of + for space in python query parameters
I only find urllib.parse.quote , which can replace space to %20 . But quote could not convert a dict. so, We must use...
Read more >
Common Query Parameters | Apache Solr Reference Guide 6.6
The parameter specifies the maximum number of documents from the complete result set that Solr should return to the client at one time....
Read more >
String functions - Cypher Manual - Neo4j
right() returns a string containing the specified number of rightmost characters ... rtrim() returns the original string with trailing whitespace removed.
Read more >
Legacy SQL Functions and Operators | BigQuery - Google Cloud
Returns the current row number of the query result over the window. Other functions. CASE WHEN ... THEN, Use CASE to choose among...
Read more >
SQL TRIM function
In the following query, we have white space before and after the string. ... We did not specify any characters to remove in...
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