markusressel/py-image-dedup

Exception when running the docker container

baloan opened this issue · 2 comments

baloan commented

Describe the bug
During initital run:
AttributeError: module 'numpy' has no attribute 'warnings'. Did you mean: 'hanning'?

To Reproduce

  1. copy docker-compose.yml to directory
  2. docker-compose up

Desktop (please complete the following information):

  • OS: ubuntu 20.04
  • Docker version 20.10.21, build 20.10.21-0ubuntu1~20.04.2

Full error message

py-image-dedup_1  | DEBUG:py_image_dedup.util:Starting daemon...
py-image-dedup_1  | Starting daemon...
py-image-dedup_1  | Traceback (most recent call last):
py-image-dedup_1  |   File "/usr/local/bin/py-image-dedup", line 5, in <module>
py-image-dedup_1  |     cli()
py-image-dedup_1  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
py-image-dedup_1  |     return self.main(*args, **kwargs)
py-image-dedup_1  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
py-image-dedup_1  |     rv = self.invoke(ctx)
py-image-dedup_1  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
py-image-dedup_1  |     return _process_result(sub_ctx.command.invoke(sub_ctx))
py-image-dedup_1  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
py-image-dedup_1  |     return ctx.invoke(self.callback, **ctx.params)
py-image-dedup_1  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
py-image-dedup_1  |     return __callback(*args, **kwargs)
py-image-dedup_1  |   File "/app/py_image_dedup/cli.py", line 83, in c_daemon
py-image-dedup_1  |     deduplicator.deduplicate_all()
py-image-dedup_1  |   File "/app/py_image_dedup/library/deduplicator.py", line 83, in deduplicate_all
py-image-dedup_1  |     numpy.warnings.filterwarnings('ignore')
py-image-dedup_1  |   File "/usr/local/lib/python3.10/site-packages/numpy/__init__.py", line 284, in __getattr__
py-image-dedup_1  |     raise AttributeError("module {!r} has no attribute "
py-image-dedup_1  | AttributeError: module 'numpy' has no attribute 'warnings'. Did you mean: 'hanning'?

Having the same issue. Did you resolve it?

shbatm commented

I got it working by pinning the numpy version to a lower version. PR#345 added to replicate.