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

DDSFile.save raise a type error by invalid write #8675

Closed
marinelay opened this issue Apr 11, 2024 · 1 comment
Closed

DDSFile.save raise a type error by invalid write #8675

marinelay opened this issue Apr 11, 2024 · 1 comment

Comments

@marinelay
Copy link
Contributor

Software Versions

  • Python: 3.9.18
  • OS: Ubuntu 22.04
  • Kivy: 2.3.0
  • Kivy installation method: pip install

Describe the bug

kivy/kivy/lib/ddsfile.py

Lines 312 to 314 in c0d4894

with open(filename, 'wb') as fd:
fd.write('DDS ')
fd.write(pack('I' * 31, *header))

At line 313, writing string is not allowed because the file is opened as binary format.
It should be fixed to b'DDS '.

Thank you.

Code and Logs and screenshots

kivy/kivy/lib/ddsfile.py

Lines 312 to 314 in c0d4894

with open(filename, 'wb') as fd:
fd.write('DDS ')
fd.write(pack('I' * 31, *header))

@marinelay
Copy link
Contributor Author

Oh, I just now saw the comment Kivy does not provide any support for it.
I'm sorry to report false alarm.

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

1 participant