Closed agross closed 5 months ago
did you include the address with the port? "http://192.168.1.100:8090"
No, my Immich runs on a domain like https://immich.example.com
.
could you try with the local domain?
Not sure what you mean by "the local domain". An address similar to the above is the only way to reach my Immich instance.
OK, found it: https://immich.example.com
works, https://immich.example.com/
does not. The trailing slash causes requests to //api/...
which returns plain HTML instead of JSON.
This is the next exception which happened on pair #5:
Fetch con cache
2024-03-21 22:35:33.351 Uncaught app exception
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script
exec(code, module.__dict__)
File "/Users/agross/Downloads/immich_duplicate_finder/app.py", line 293, in <module>
main()
File "/Users/agross/Downloads/immich_duplicate_finder/app.py", line 275, in main
show_duplicate_photos(assets,limit)
File "/Users/agross/Downloads/immich_duplicate_finder/app.py", line 193, in show_duplicate_photos
image1 = np.array(stream_asset(original['id'],immich_server_url))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 210, in wrapper
return cached_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 239, in __call__
return self._get_or_create_cached_value(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 266, in _get_or_create_cached_value
return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 322, in _handle_cache_miss
computed_value = self._info.func(*func_args, **func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/agross/Downloads/immich_duplicate_finder/app.py", line 90, in stream_asset
image = Image.open(image_bytes)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/PIL/Image.py", line 3309, in open
raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x10288ccc0>
First of all I revised the code to handle that situation. base_url = immich_server_url.rstrip('/') Let's close this and open a new issue....just for tracking
After fixing #1 by moving the
save_settings_to_db
method to the top of the file, I now get this when trying to fetch assets: