These are my first steps with photoprism_client version 0.2.1, installed using pip install --break-system-packages photoprism-client on a Debian Bookworm system. Photoprism is running in a Docker container on my NAS and is behind a NGINX proxy for connecting to Photoprism using HTTPS.
When running this code, I get a test.jpg.svg file as a result.
#!/usr/bin/python3
from photoprism.Session import Session
from photoprism.Photo import Photo
import random
pp_session = Session("USERNAME", "PASSWORD", "PHOTOPRISM_URL", use_https=True, verify_cert=True)
pp_session.create()
random_offset = random.randint(0,5000)
p = Photo(pp_session)
data = p.search(query='type:image', count=1, offset=random_offset)
print(data)
p.download_file(data[0]["Hash"], filename="test.jpg")
When running this code without defining a filename="test.jpg" parameter I get the Content-Disposition error which is mentioned in another issue here on github.
These are my first steps with photoprism_client version 0.2.1, installed using pip install --break-system-packages photoprism-client on a Debian Bookworm system. Photoprism is running in a Docker container on my NAS and is behind a NGINX proxy for connecting to Photoprism using HTTPS.
When running this code, I get a test.jpg.svg file as a result.
When running this code without defining a filename="test.jpg" parameter I get the Content-Disposition error which is mentioned in another issue here on github.
Running the script, gives this output:
The file test.jpg.svg is now on my filesystem. The content of this scalable vector graphics .svg file is:
My script is based on an example in this repository. Am I doing something wrong or is this a bug?