Skip to content

Conversation

diegojuan
Copy link

apt.py is showing this error

jd@Juans-MacBook-Pro apt-decoder % python3 apt.py rs.wav rs1.pmng
Traceback (most recent call last):
 File "apt.py", line 100, in <module>
   apt.decode(outfile)
 File "apt.py", line 32, in decode
   image = PIL.Image.fromarray(matrix)
 File "/Library/Python/3.7/site-packages/PIL/__init__.py", line 42, in __getattr__
   raise AttributeError("module '{}' has no attribute '{}'".format(__name__, name))
AttributeError: module 'PIL' has no attribute 'Image'

To fix this, is recommended to import Image

import PIL.Image

This fix the error and the image can be properly generated

@zacstewart
Copy link
Owner

@diegojuan I believe you will also need to touch line 31 to use Image instead of PIL.Image

Repository owner deleted a comment from Matrzowoli Oct 27, 2021
Repository owner deleted a comment from martinber Oct 27, 2021
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

Successfully merging this pull request may close these issues.

2 participants