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

TypeError: only integer arrays with one element can be converted to an index #17

Open
bitwave opened this issue Jan 9, 2017 · 0 comments

Comments

@bitwave
Copy link

bitwave commented Jan 9, 2017

got this weird error:

  getting palette...
/usr/lib/python3.6/site-packages/noteshrink.py:132: RuntimeWarning: invalid value encountered in true_divide
  saturation = delta.astype(np.float32) / cmax.astype(np.float32)
  applying palette...
  saving page0000.png...
Traceback (most recent call last):
  File "/usr/bin/noteshrink", line 11, in <module>
    load_entry_point('noteshrink==0.1.1', 'console_scripts', 'noteshrink')()
  File "/usr/lib/python3.6/site-packages/noteshrink.py", line 584, in main
    notescan_main(options=get_argument_parser().parse_args())
  File "/usr/lib/python3.6/site-packages/noteshrink.py", line 564, in notescan_main
    save(output_filename, labels, palette, dpi, options)
  File "/usr/lib/python3.6/site-packages/noteshrink.py", line 455, in save
    output_img.putpalette(palette.flatten())
  File "/usr/lib/python3.6/site-packages/PIL/Image.py", line 1483, in putpalette
    data = bytes(data)
TypeError: only integer arrays with one element can be converted to an index

Maybe this is a python3.6 problem

Regards,
bitwave

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