Storyyeller / Krakatau

Java decompiler, assembler, and disassembler
GNU General Public License v3.0
1.95k stars 219 forks source link

No attribute getcwdu found for os module #139

Closed R0bLucci closed 6 years ago

R0bLucci commented 6 years ago

When I run the assemble.py file, with Python version 3.6.4 I get the following error:

Traceback (most recent call last): File "Krakatau/assemble.py", line 32, in out = script_util.makeWriter(args.out, '.class') File "/home/robert/playAround/Krakatau/Krakatau/script_util.py", line 181, in makeWriter return DirectoryWriter(base_path, suffix) File "/home/robert/playAround/Krakatau/Krakatau/script_util.py", line 128, in init base_path = os.getcwdu() AttributeError: module 'os' has no attribute 'getcwdu'

Changing the line "base_path = os.getcwdu()" to "base_path = os.getcwd()" fixes it. I am not sure if the uni code object here is needed.

The problem does not occur when I run assemble.py with Python version 2.7.14

Storyyeller commented 6 years ago

Should be fixed now. I never noticed the issue because I always specify an output directory explicitly.