a2-4am / wozardry

A multi-purpose tool for manipulating .woz disk images
MIT License
26 stars 9 forks source link

Wozardry doesn't seem to work on python versions newer than 3.6 #10

Open KimAhmad opened 1 month ago

KimAhmad commented 1 month ago

Attempting to run the wozardry 2019-03-04 release using python 3.8.0 or 3.10.12 and use the "edit" command returns the following error:

Traceback (most recent call last): File "wozardry.py", line 980, in parse_args(sys.argv[1:]) File "wozardry.py", line 975, in parse_args args.action(args) File "wozardry.py", line 818, in call output_as_bytes = bytes(self.woz_image) File "wozardry.py", line 475, in bytes return self.dump() File "wozardry.py", line 481, in dump trks = self._dump_trks() File "wozardry.py", line 550, in _dump_trks return self._dump_trks_v2() File "wozardry.py", line 581, in _dump_trks_v2 trk_chunk.extend(to_uint32(track.bits.length())) AttributeError: 'bitarray.bitarray' object has no attribute 'length'

Some searching online seems to indicate that this is due to bitarray's behaviour changing in python versions newer than 3.6. However, attempting to run it in Python 3.6.0 results in the following error (even on just a "dump" command):

Traceback (most recent call last): File "wozardry.py", line 8, in import bitarray # https://pypi.org/project/bitarray/ File "C:[MY PYTHON PATH]\Python\Python36-32\lib\site-packages\bitarray__init__.py", line 14, in from bitarray._bitarray import (bitarray, decodetree, _sysinfo, ImportError: DLL load failed: The specified procedure could not be found.

I'm not the most savvy python user, so the last state may be something obvious, but I couldn't get further than this. Nonetheless, being able to use it with current versions of Python would be a huge help.

a2-4am commented 4 weeks ago

I believe this was fixed in https://github.com/a2-4am/wozardry/commit/3d99ea09cee58af1783b267e03d43b81719b629c but never released. Can you try replacing wozardry.py with this https://raw.githubusercontent.com/a2-4am/wozardry/3d99ea09cee58af1783b267e03d43b81719b629c/wozardry.py and let me know if that works for you?