Closed 1989gironimo closed 2 years ago
Your comment on #37 would cover this. I'll keep this open though.
@1989gironimo Can you give a full traceback of where/when this happens?
Directly at trying to start killer.
Traceback (most recent call last): File "/home/robot/.local/bin/killer", line 10, in <module> sys.exit(main()) File "/home/robot/.local/lib/python3.7/site-packages/killer/killer.py", line 62, in main execute.detect_tray() File "/home/robot/.local/lib/python3.7/site-packages/killer/killer_posix.py", line 121, in detect_tray fd = os.open(disk_tray, os.O_RDONLY | os.O_NONBLOCK) FileNotFoundError: [Errno 2] No such file or directory: '/dev/sr0'
Updated killer to the newest version 0.7.1 and got this: `sh: 0: getcwd() failed: No such file or directory
_ _ _ _ _
| |/ /(_)| | |
| / _ | | | ____ _ _
| \ | || | |/ _ ) `_|
| | \ | || | ( (/_/| |
|_|\_\|_|\__)_)____)_|
\ | _ \ `. _|__/
Traceback (most recent call last):
File "/home/robot/.local/bin/killer", line 10, in <module>
sys.exit(main())
File "/home/robot/.local/lib/python3.7/site-packages/killer/killer.py", line 88, in main
execute = get_killer(args)
File "/home/robot/.local/lib/python3.7/site-packages/killer/killer.py", line 48, in get_killer
from killer.killer_posix import KillerPosix
File "/home/robot/.local/lib/python3.7/site-packages/killer/killer_posix.py", line 9, in <module>
from killer.killer_base import KillerBase
File "/home/robot/.local/lib/python3.7/site-packages/killer/killer_base.py", line 16, in <module>
class KillerBase(ABC):
File "/home/robot/.local/lib/python3.7/site-packages/killer/killer_base.py", line 17, in KillerBase
CONFIG_SEARCH_PATHS = [Path.cwd(), Path.home()]
File "/usr/lib/python3.7/pathlib.py", line 1057, in cwd
return cls(os.getcwd())
FileNotFoundError: [Errno 2] No such file or directory
`
https://github.com/Lvl4Sword/Killer/issues/41#issuecomment-520932801 is just because FileNotFoundError: [Errno 2] No such file or directory: '/dev/sr0'
- which is the CDROM drive not being found.
I see you're running as robot
as opposed to root. This'll prevent the shutdown command from actually initiating if any tampering is detected.
Can you run
from pathlib import Path
print(Path.cwd())
as the robot
user?
I'm curious as to why File "/usr/lib/python3.7/pathlib.py", line 1057, in cwd return cls(os.getcwd())
shows up before the FileNoFoundError
Also, your second comment doesn't actually include everything. Can you provide the full traceback including what's causing the FileNotFoundError
?
I'll report back in a few days :)
Ok, reporting back.
killer was installed via pip3 install --user -U killer
sudo killer
doesn't work, probably it's installed in the "user" folder of pip, not the systemwide one.
Should I try this as well? What's the point anyway to recommend installing it in the home directory and not systemwide?
./local/bin/kiler
right after import sys
but it didn't change the output@1989gironimo If you try the new branch, do you still have this issue?
This should be fixed in the new branch, closing
It just throws the python error message, which is confusing for non-pythondevs :)