mauricelambert / PyObfuscator

This module obfuscates python code.
GNU General Public License v3.0
16 stars 7 forks source link

TypeError: argument of type 'NoneType' is not iterable on code 'from . import somemodule' #15

Closed keewa closed 5 months ago

keewa commented 6 months ago

my code files have some relative import like this:

util/ ├── module1.py └── module2.py from . import module1

File "...\PyObfuscator.py", line 965, in visit_ImportFrom targets, values = self.get_targets_and_value_for_import( File "...\PyObfuscator.py", line 671, in get_targets_and_value_for_import None if "." not in module else f"myimport({module!r}, {element.name!r})" TypeError: argument of type 'NoneType' is not iterable

mauricelambert commented 5 months ago

Thanks for opening this issue ! Sorry for the long time response, i will check it and i will fix it if i can reproduce the bug.

mauricelambert commented 5 months ago

Hi ! I have fixed the bug in the new version (0.1.9). Please upgrade your package (python3 -m pip install --upgrade PyObfuscator) and re-try to obfuscate your code.

Thanks for the issue @keewa !