bitfixer / bf-romulator

Romulator - RAM/ROM replacement and debug for 6502 CPU systems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot get fetch_roms.py working. Ubuntu server and Windows wsl ubuntu

dabonetn opened this issue · comments

Issuing the command 'BASEURL=http://bitfixer.com make fetch_roms' I get the following error.
I also get this trying to use the zimmers pet rom directory as the base.

user@ubuntu-compiler:~/bf-romulator$ BASEURL=http://bitfixer.com make fetch_roms
mkdir -p roms
#cd bin; python ../tools/fetch_roms.py /home/user/bf-romulator/config/memory_set_default.csv http://bitfixer.com
cd roms; python ../tools/fetch_roms.py /home/user/bf-romulator/config/memory_set_default.csv http://bitfixer.com
Traceback (most recent call last):
File "../tools/fetch_roms.py", line 26, in
for row in romreader:
_csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)
make: *** [Makefile:85: fetch_roms] Error 1

Any suggestions?

You could try changing line 24 of fetch_roms.py from:
with open(csvfile, 'rb') as csvfile:
to:
with open(csvfile, 'r') as csvfile:

python3 wants it to be opened in text mode

Installing python2 python-is-python2 got it working. apparently python3 is the default for newer installs.

As of January 1st, 2020 python2 is no longer supported either.

Just build a new vm and the new fetch rom now works.

The only complaint I have now, is that if you go ahead and do a git clone to grab the romulator tree, (instead of just grabbing the setup script)
and then run setup_linux.sh, it completes, and says everything is good, but then when you make romulator, it fails because
everything is actually setup in a bf-romulator/bf-romulator directory.

Maybe add a check to see if you are already in the bf-romulator directory when running the setup script?