Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'array.array' object has no attribute 'tostring' - issue with python version? #2

Closed
Strugglemeat opened this issue Jun 1, 2022 · 1 comment

Comments

@Strugglemeat
Copy link

Strugglemeat commented Jun 1, 2022

[Strugglemeat@b550maoruspro nrom-template-0.05]$ make
ca65  src/nrom.s -o obj/nes/nrom.o
ca65  src/init.s -o obj/nes/init.o
tools/pilbmp2nes.py tilesets/bggfx.png obj/nes/bggfx.chr
Traceback (most recent call last):
  File "/home/Strugglemeat/nesdev/nrom-template-0.05/tools/pilbmp2nes.py", line 210, in <module>
    main()
  File "/home/Strugglemeat/nesdev/nrom-template-0.05/tools/pilbmp2nes.py", line 187, in main
    outdata = pilbmp2chr(im, tileWidth, tileHeight,
  File "/home/Strugglemeat/nesdev/nrom-template-0.05/tools/pilbmp2nes.py", line 95, in pilbmp2chr
    data = formatTile(tile)
  File "/home/Strugglemeat/nesdev/nrom-template-0.05/tools/pilbmp2nes.py", line 188, in <lambda>
    lambda im: formatTilePlanar(im, planes, hflip, little))
  File "/home/Strugglemeat/nesdev/nrom-template-0.05/tools/pilbmp2nes.py", line 79, in formatTilePlanar
    return out.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'
make: *** [makefile:105: obj/nes/bggfx.chr] Error 1

sounds like tostring was changed to tobytes in later versions of python? python-intelhex/intelhex#45

edit: yes, changing two instances of 'tostring' to 'tobytes' in the tools/pilbmp2nes.py file allowed me to run 'make'

@pinobatch
Copy link
Owner

This had been fixed in 3853039

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants