Bug #6665

Deprecation warnings with python 2.6 and pillow

Added by andythenorth over 5 years ago. Updated 7 months ago.

Status:ClosedStart date:2013-12-22
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:-
Target version:-

Description

I'm leaving this here for reference. Using python 2.6 for nml, I switched from PIL to pillow (I needed to reinstall after a system migration, and PIL is a PITA, solved by pip install of pillow).

This resulted in the following deprecation warnings during nml tests (and whilst compiling grfs).

/Users/andy/Documents/OTTD_graphics/tools/nml/nml/output_grf.py:554: DeprecationWarning: tostring() is deprecated. Please call tobytes() instead.
  mask_sprite_data = self.palconvert(mask_sprite.tostring(), im_mask_pal)
/Users/andy/Documents/OTTD_graphics/tools/nml/nml/output_grf.py:560: DeprecationWarning: tostring() is deprecated. Please call tobytes() instead.
  rgb_data = array.array('B', sprite.tostring())

Solved for me by switching to python 2.7. Alberth recommended I leave a note behind as evidence of python 2 problems for nml :)

History

#1 Updated by planetmaker over 4 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

resolved with py3to2 conversion

#2 Updated by Anonymous 7 months ago

  • Status changed from Closed to Reopened

#3 Updated by planetmaker 7 months ago

  • Status changed from Reopened to Closed

Also available in: Atom PDF