errors on editor save files
Closed this issue · 3 comments
kapilt commented
$ hammett
pythTraceback (most recent call last):
File "/Users/kapilt/.pyenv/versions/c7n-3.8/bin/hammett", line 10, in <module>
sys.exit(main_cli())
File "/Users/kapilt/.pyenv/versions/3.8.2/envs/c7n-3.8/lib/python3.8/site-packages/hammett/__init__.py", line 623, in main_cli
return main(
File "/Users/kapilt/.pyenv/versions/3.8.2/envs/c7n-3.8/lib/python3.8/site-packages/hammett/__init__.py", line 445, in main
update_result_db(g.result_db, collect_file_data(g.source_location))
File "/Users/kapilt/.pyenv/versions/3.8.2/envs/c7n-3.8/lib/python3.8/site-packages/hammett/__init__.py", line 313, in collect_file_data
data[full_path] = os.stat(full_path).st_mtime_ns
FileNotFoundError: [Errno 2] No such file or directory: 'tests/.#common.py'
the file in question is an emacs temp save file.
boxed commented
Thanks! I've pushed a fix and I'd love it if you could verify it.
kapilt commented
that helped but showed another error, this is on a different box, linux, pyenv with 3.8 virtualenv
❯ python -m hammett tests/test_account.py
Traceback (most recent call last):
File "/home/kapil/.pyenv/versions/3.8.5/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/kapil/.pyenv/versions/3.8.5/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/kapil/projects/hammett/hammett/__main__.py", line 3, in <module>
exit(main_cli())
File "/home/kapil/projects/hammett/hammett/__init__.py", line 623, in main_cli
return main(
File "/home/kapil/projects/hammett/hammett/__init__.py", line 445, in main
update_result_db(g.result_db, collect_file_data(g.source_location))
File "/home/kapil/projects/hammett/hammett/__init__.py", line 313, in collect_file_data
data[full_path] = os.stat(full_path).st_mtime_ns
FileNotFoundError: [Errno 2] No such file or directory: 'lib/python3.6/copy.py'
its a bit unclear where its sourcing 3.6 as a file from, afaict the base os default is also python 3.8 and there isn't a 3.6 install on the box.
boxed commented
Hammett tries to guess where your code is. Seems this isn't going so well. Do you have a lib
directory where you're running hammett?