brightio / penelope

Penelope Shell Handler
GNU General Public License v3.0
652 stars 89 forks source link

Error on line 438 #31

Closed grisuno closed 1 week ago

grisuno commented 1 week ago

Issue Description I encountered a NameError while executing the script located at /home/gris/tools/penelope/penelope.py. The error occurs in the cmdloop method when it attempts to call the preloop function.

Error Traceback arduino Copiar cΓ³digo Traceback (most recent call last): File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "/usr/lib/python3.11/threading.py", line 975, in run self._target(*self._args, **self._kwargs) File "/home/$USER/tools/penelope/penelope.py", line 349, in cmdloop self.preloop() File "/home/$USER/tools/penelope/penelope.py", line 438, in preloop class.load_history(options.cmd_histfile) ^^^^^^^ NameError: name 'options' is not defined. Did you mean: 'Options'? Details The NameError indicates that the variable options is not defined in the current scope. The intended usage seems to be Options.cmd_histfile, which suggests that options was expected to be an instance of the Options class or similar. Upon encountering this error, the script enters an infinite loop, and I am forced to terminate it using killall.

brightio commented 1 week ago

Hi @grisuno, thanks for reporting this. I can't reproduce this error. Can you please tell me how you execute the script (arguments etc)?

grisuno commented 1 week ago

without arguments, in a parrot 6.1

image

brightio commented 1 week ago

I tried this on Parrot 6.1 and I can't reproduce it. Can you please send me a screenshot of the very first exceptions?

grisuno commented 1 week ago

image

The script enters an infinite loop, continuously displaying the same error message. It keeps repeating the last error, and I have to manually terminate the process using kill -9.

Error details:

python penelope.py

Oops...🐞 ──────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last): File "/home/gris/tools/penelope/penelope.py", line 4282, in options = Options() ^^^^^^^^^ File "/home/gris/tools/penelope/penelope.py", line 4194, in init self.basedir = Path(pwd.getpwuid(GID).pw_dir) / f'.{program}' ^^^^^^^^^^^^^^^^^ KeyError: 'getpwuid(): uid not found: 1001' Then, it repeats the following error in a loop:

Oops...🐞 ──────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last): File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "/usr/lib/python3.11/threading.py", line 975, in run self._target(*self._args, **self._kwargs) File "/home/gris/tools/penelope/penelope.py", line 349, in cmdloop self.preloop() File "/home/gris/tools/penelope/penelope.py", line 438, in preloop class.load_history(options.cmd_histfile) ^^^^^^^ NameError: name 'options' is not defined. Did you mean: 'Options'? This error keeps repeating indefinitely, and I have to stop the process by force using kill -9.

brightio commented 1 week ago

Thank you very much @grisuno for reporting this! Can you please try now to verify that it is fixed?

grisuno commented 6 days ago

Thanks you bro, now works :) you are awesome ;)