minimaxir/stylecloud

ERROR import palettable

iandreafc opened this issue · 0 comments

Hi,

when I run stylecloud on my PC I have no problem, but then I deploy it on an ubuntu machine and make it run inside a docker container activated through flask.

When I do so, I get an error as it seem the way palettable is imported (line 91 of your function) generates an error. Could you help me solve that? Can I avoid importing palettable and just give it the colors (even if I use the colors the palette is generated)?

File "/usr/lib/python3.8/site-packages/stylecloud/stylecloud.py", line 237, in gen_stylecloud
palette_func = gen_palette(palette)
File "/usr/lib/python3.8/site-packages/stylecloud/stylecloud.py", line 91, in gen_palette
return self.__local()
File "/usr/lib/python3.8/site-packages/flask/globals.py", line 38, in _lookup_req_object
raise RuntimeError(_request_ctx_err_msg)
RuntimeError: Working outside of request context.

This typically means that you attempted to use functionality that needed
an active HTTP request. Consult the documentation on testing for
information about how to avoid this problem.
import(
ModuleNotFoundError: No module named 'palettable.'

Thanks a lot for this nice package! :)