RhetTbull / osxphotos

Python app to work with pictures and associated metadata from Apple Photos on macOS. Also includes a package to provide programmatic access to the Photos library, pictures, and metadata.
MIT License
1.99k stars 94 forks source link

Installation fails with pipx on macOS #1672

Open Qhilm opened 2 weeks ago

Qhilm commented 2 weeks ago

Describe the bug

Initial installation fails, pip fails to download osxmetadata 1.3.5 somehow:

Downloading osxmetadata-1.3.5-py3-none-any.whl.metadata (62 kB)
PIP STDERR
----------
ERROR: Exception:
Traceback (most recent call last):
 File "/Users/cysimons/.local/pipx/shared/lib/python3.12/site-packages/pip/_vendor/urllib3/response.py", line 438, in _error_catcher
   yield
 File "/Users/cysimons/.local/pipx/shared/lib/python3.12/site-packages/pip/_vendor/urllib3/response.py", line 561, in read
   data = self._fp_read(amt) if not fp_closed else b""
          ^^^^^^^^^^^^^^^^^^
 File "/Users/cysimons/.local/pipx/shared/lib/python3.12/site-packages/pip/_vendor/urllib3/response.py", line 527, in _fp_read
   return self._fp.read(amt) if amt is not None else self._fp.read()
          ^^^^^^^^^^^^^^^^^^
 File "/Users/cysimons/.local/pipx/shared/lib/python3.12/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 98, in read
   data: bytes = self.__fp.read(amt)
                 ^^^^^^^^^^^^^^^^^^^
 File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 479, in read
   s = self.fp.read(amt)
       ^^^^^^^^^^^^^^^^^
 File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
   return self._sock.recv_into(b)
          ^^^^^^^^^^^^^^^^^^^^^^^
 File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 1252, in recv_into
   return self.read(nbytes, buffer)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 1104, in read
   return self._sslobj.read(len, buffer)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ssl.SSLError: [SSL] record layer failure (_ssl.c:2559)

Troubleshooting so far: pip install --force-reinstall -v "osxmetadata==1.3.5" works fine on the same machine.

To Reproduce Steps to reproduce the behavior:

  1. brew install pipx
  2. pipx install osxphotos

Expected behavior Installation successful

Desktop:

Additional context First install on this system.

RhetTbull commented 1 week ago

I have not been able to reproduce this. Will keep playing with this as I have time to see if I can figure out what's going on.

Qhilm commented 1 week ago

I installed the whole thing using pip instead of pipx and it works flawlessly. Don't know what this strange SSL issue is.