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

Can't take screenshot #405

Closed
zhengxyz123 opened this issue Jun 22, 2021 · 2 comments
Closed

Can't take screenshot #405

zhengxyz123 opened this issue Jun 22, 2021 · 2 comments
Labels
reproducible Has example code which reproduces the issue

Comments

@zhengxyz123
Copy link
Contributor

Follow this guide, and raise an error:

File "/home/jason/mcpy/Minecraft/minecraft/entity/player/player.py", line 221, in on_key_press
    pyglet.image.get_buffer_manager().get_color_buffer().save(os.path.join(search_mcpy(), 'screenshot', name))
  File "/usr/lib/python3.9/site-packages/pyglet/image/__init__.py", line 499, in save
    encoder.encode(self, file, filename)
  File "/usr/lib/python3.9/site-packages/pyglet/image/codecs/png.py", line 101, in encode
    data.fromstring(image.get_data(image.format, image.pitch))
AttributeError: 'array.array' object has no attribute 'fromstring'

pyglet version 1.5.17

@benmoran56 benmoran56 added the reproducible Has example code which reproduces the issue label Jun 23, 2021
@benmoran56
Copy link
Member

This is now fixed in pyglet 1.5.18. Please give that a try to confirm.

@zhengxyz123
Copy link
Contributor Author

Yes, The problem has solved. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reproducible Has example code which reproduces the issue
Projects
None yet
Development

No branches or pull requests

2 participants