Skip to content

repeated numpy import leads to crash #7

@sim590

Description

@sim590

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions