Displays cache miss tracebacks on first-time searches. (Version 2.0.17)
See original GitHub issueWhat happens:
Enter a new query:
(base) michaels-mbp mellis % howdoi reverse a list
WARNING: Exception raised while handling cache file '/Users/mellis/Library/Caches/howdoi/cde7bf89fc999ebae8a021e7e0cc6fd3'
Traceback (most recent call last):
File "/Users/mellis/miniconda3/lib/python3.6/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/mellis/Library/Caches/howdoi/cde7bf89fc999ebae8a021e7e0cc6fd3'
WARNING: Exception raised while handling cache file '/Users/mellis/Library/Caches/howdoi/a70d09860b89b08bd9613e61d0a9f902'
Traceback (most recent call last):
File "/Users/mellis/miniconda3/lib/python3.6/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/mellis/Library/Caches/howdoi/a70d09860b89b08bd9613e61d0a9f902'
WARNING: Exception raised while handling cache file '/Users/mellis/Library/Caches/howdoi/d46878dde4e8790a9a070109295b90c0'
Traceback (most recent call last):
File "/Users/mellis/miniconda3/lib/python3.6/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/mellis/Library/Caches/howdoi/d46878dde4e8790a9a070109295b90c0'
newlist = oldlist[::-1]
What you expected to happen:
Show the answer only.
Output with --explain
Please provide the output of running the same command with the --explain
flag like so
(base) michaels-mbp mellis % howdoi compute a median --explain
INFO: Version: 2.0.17
WARNING: Exception raised while handling cache file '/Users/mellis/Library/Caches/howdoi/02622dc58bfe1476cd77b61c3d135fa5'
Traceback (most recent call last):
File "/Users/mellis/miniconda3/lib/python3.6/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/mellis/Library/Caches/howdoi/02622dc58bfe1476cd77b61c3d135fa5'
INFO: Fetching answers for query: compute a median
WARNING: Exception raised while handling cache file '/Users/mellis/Library/Caches/howdoi/067fffb18193d8a3a55b439ecda0d0fb'
Traceback (most recent call last):
File "/Users/mellis/miniconda3/lib/python3.6/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/mellis/Library/Caches/howdoi/067fffb18193d8a3a55b439ecda0d0fb'
INFO: Searching google with URL: https://www.google.com/search?q=site:stackoverflow.com%20compute%20a%20median&hl=en
INFO: stackoverflow.com links found on google: 1
INFO: Answers requested: 1, Starting at position: 1
WARNING: Exception raised while handling cache file '/Users/mellis/Library/Caches/howdoi/20d6d5d60064cc48785e0a2d5f48da55'
Traceback (most recent call last):
File "/Users/mellis/miniconda3/lib/python3.6/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/mellis/Library/Caches/howdoi/20d6d5d60064cc48785e0a2d5f48da55'
INFO: Fetching page: https://stackoverflow.com/questions/45309447/calculating-median-javascript
INFO: Total answers returned: 1
function median(values){
if(values.length ===0) return 0;
values.sort(function(a,b){
return a-b;
});
var half = Math.floor(values.length / 2);
if (values.length % 2)
return values[half];
return (values[half - 1] + values[half]) / 2.0;
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Bug listing with status RESOLVED with resolution FIXED as at ...
Bug listing with status RESOLVED with resolution FIXED as at 2022/12/17 06:46:03.
Read more >Understanding the Python Traceback
Python prints a traceback when an exception is raised in your code. The traceback output can be a bit overwhelming if you're seeing...
Read more >rubygems/CHANGELOG.md at master - GitHub
Fix gem update --system crashing when latest version not supported. Pull request #5191 by deivid- ... Add missing require 'fileutils' in Gem::ConfigFile ....
Read more >Release Notes — TcEx 2.0.26 documentation
Updated deepdiff validation method to better handle OrderedDicts. Added simple caching to env_store. Added session recording & playback for testing framework.
Read more >537f40851ea148e111bab7c4da...
(BUG:171957) * Fixed a possible crash in the non-const version of ... upstream version 0.2.8 introducing cache_{check,dump,repair,restore}; missing patch ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same here!
Same here! Thank you! 🤩