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

repeated numpy import leads to crash #7

Open
sim590 opened this issue Dec 30, 2019 · 1 comment
Open

repeated numpy import leads to crash #7

sim590 opened this issue Dec 30, 2019 · 1 comment

Comments

@sim590
Copy link

sim590 commented Dec 30, 2019

See this for the thread on the error.

This concerns kodi65 since one of its modules imports PIL which makes use of numpy. Therefore, executing multiple times some plugin functionnality making use of kodi65's imagetools module, for instance, leads to a crash. More precisely, I have found that extendedinfo plugin would not execute itself more than once before getting the crash. That is when pressing the up-arrow for getting extended information about some actor of film/series, pressing a second time triggers the crash. I did go around that issue by removing import calls to kodi65's imagetools module. Here is a diff of the change I have made on file imagetools.py to go around the issue:

10c10
< import PIL.ImageFilter
---
> # import PIL.ImageFilter
49,50c49,51
<         imgfilter = MyGaussianBlur(radius=radius)
<         img = img.convert('RGB').filter(imgfilter)
---
>         # imgfilter = MyGaussianBlur(radius=radius)
>         # img = img.convert('RGB').filter(imgfilter)
111,112c112,113
< class MyGaussianBlur(PIL.ImageFilter.Filter):
<     name = "GaussianBlur"
---
> # class MyGaussianBlur(PIL.ImageFilter.Filter):
> #     name = "GaussianBlur"
114,115c115,116
<     def __init__(self, radius=2):
<         self.radius = radius
---
> #     def __init__(self, radius=2):
> #         self.radius = radius
117,118c118,119
<     def filter(self, image):
<         return image.gaussian_blur(self.radius)
---
> #     def filter(self, image):
> #         return image.gaussian_blur(self.radius)

Please, find a way of going more cleanly around the numpy issue. In short, I think the solution revolves around mattip's comment on the issue.

@malaterre
Copy link

AFAIK numpy/numpy#14384 seems to be fixed now.

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

2 participants