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.

Displays cache miss tracebacks on first-time searches. (Version 2.0.17)

See original GitHub issue

What 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:closed
  • Created 2 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
inezpereiracommented, Aug 26, 2021

Same here!

howdoi for loop python
WARNING: Exception raised while handling cache file '/Users/inespereira/Library/Caches/howdoi/3d529430b256b3739e4f940f8192375d'
Traceback (most recent call last):
  File "/Users/inespereira/Library/Python/3.8/lib/python/site-packages/cachelib/file.py", line 162, in get
    with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/inespereira/Library/Caches/howdoi/3d529430b256b3739e4f940f8192375d'
WARNING: Exception raised while handling cache file '/Users/inespereira/Library/Caches/howdoi/c8cd71e640c957db367486307e244085'
Traceback (most recent call last):
  File "/Users/inespereira/Library/Python/3.8/lib/python/site-packages/cachelib/file.py", line 162, in get
    with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/inespereira/Library/Caches/howdoi/c8cd71e640c957db367486307e244085'
WARNING: Exception raised while handling cache file '/Users/inespereira/Library/Caches/howdoi/08686ad756e0af7c39d0cf9a9d27db23'
Traceback (most recent call last):
  File "/Users/inespereira/Library/Python/3.8/lib/python/site-packages/cachelib/file.py", line 162, in get
    with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/inespereira/Library/Caches/howdoi/08686ad756e0af7c39d0cf9a9d27db23'
mylist = [1,2,3]
for item in mylist:
    print item

mydict  = {1:'one', 2:'two', 3:'three'}
for key in mydict:
    print key, mydict[key]
0reactions
inezpereiracommented, Sep 7, 2021

Same here! Thank you! 🤩

Read more comments on GitHub >

github_iconTop 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 >

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