Open spencerc99 opened 1 year ago
How did you install osxphotos? (e.g. pipx, pip, executable off the release page)
What version of python are you using? (python --version
) and how did you install it? (e.g. via homebrew, python.org, etc.)
Abort trap: 6
is an OS error. Other users are using osxphotos on 13.2 so I suspect this has to do with the python version. Assuming you installed this with pipx, I'd try the following:
pipx uninstall osxphotos
brew upgrade python
brew upgrade pipx
pipx install osxphotos
If you've installed other apps with pipx, you'll want to do pipx reinstall-all
If the problem persists, I'll explore some more.
I created a virtual machine with 13.2.1 tonight to try to replicate this but osxphotos ran fine. I tried both pipx and the pre-built binary and both worked.
thanks for the help! i think it was something corrupted with my python installation (new machine). I'm now running into a weird issue with the post-function not being found? any ideas on this? I double-checked a lot of things and can't figure out what could be wrong
oh wait i got around that problem and back to my normal issue hmm. let me do a full python reinstall and see
perhaps something to do with this... https://stackoverflow.com/questions/24287239/abort-trap-6-when-running-a-python-script
i just seem to get stuck as soon as it tries to export the first photo. I've tried without the post function and it still gets stuck
i suspect it's partially related to me using conda to manage my python packages.. something weird with that and the newest mac os?
i suspect it's partially related to me using conda to manage my python packages
I suspect so as well. I have tested osxphotos both with the homebrew version of python and the python.org version on 13.2 and they work as expected. I do not use Conda and have not tested it. (Early development with osxphotos was actually done via conda but I ran into issues...don't recall exactly what, and switched to python.org)
I suggest you install osxphotos via homebrew python + pipx and see if that works. That complicates your python setup because now you have multiple versions but that can be managed via path. For example, ensure conda path is first. pipx installs in ~/.local/bin so as long as that's in the path (pipx ensurepath
) it should just work. I have a half-dozen python versions I use for testing (and manage paths via pyenv
). If you do this, I'd uninstall osxphotos from the conda environment. If you need any additional packages for your post function, those can be installed with osxphotos install
which will install packages into the same environment that osxphotos is installed in.
@spencerc99 still having problems? Did you try with homebrew or pipx?
thank you for checking in on me! I haven't had the time to really dive into this, but I'm still having issues. I am off of conda now and installed python via brew
and running into this issue on running osxphotos
now.
FileNotFoundError: [Errno 2] No such file or directory: '/opt/homebrew/lib/python3.11/site-packages/xattr/lib_build.h'
my series of commands were:
brew install python
python3 --version // Python 3.9.6
pip install osxphotos
It seems that osxphotos
is in homebrew though?
which osxphotos // /opt/homebrew/bin/osxphotos
Weird. I tried to recreate (though not exactly as my homebrew installed python 3.11). I had to specify exact paths to python as I use pyenv to manage global python and wanted to make sure I was using the homebrew version:
โฏ brew install python
...
โฏ /opt/homebrew/bin/python3 --version
Python 3.11.2
โฏ /opt/homebrew/bin/python3 -m pip install osxphotos
...
โฏ /opt/homebrew/bin/python3
Python 3.11.2 (main, Feb 16 2023, 02:55:59) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import osxphotos
>>> photosdb = osxphotos.PhotosDB()
>>> len(photosdb.photos())
34175
>>>
โฏ /opt/homebrew/bin/osxphotos export --limit 1 $TMPDIR
Using last opened Photos library: /Users/rhet/Pictures/Photos Library.photoslibrary
Exporting 35761 photos to /private/var/folders/wk/v6g10m256mb7l820g1cgpkm00000gn/T...
Exporting 35761 photos (limit = 1) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100% 0:00:00
Processed: 35761 photos, exported: 1, missing: 1, error: 0, limit: 1/1 exported
Elapsed time: 0:00:00
It seems that osxphotos is in homebrew though?
Yes, installing osxphotos with pip install osxphotos
installs the CLI binary in the bin directory.
Looks like an issue with xattr
package which is a dependency of osxphotos. Maybe try /opt/homebrew/bin/python3 -m pip install xattr
and see if you still get the error?
I'm on Ventura 13.1 with Mac Mini M1 and osxphotos appears to be working fine with both the python.org python and the homebrew python.
Hey @RhetTbull.
Dumb question:
@oPromessa Good catch!
@spencerc99 I think @oPromessa identified the issue: you're not running the python you think you are. Try which python3
and which pip
. Do they refer to the homebrew install or the conda one you had previously (or something else?). I always run pip explicitly like this: python3 -m pip install ...
because I've been bitten more than once by the pip in the path being different than the python in the path.
okay so i've done a fresh install of python and have verified all the paths point to homebrew. I was still experiencing the original crash and abort error as before, and I seem to have narrowed it down to the --use-photokit
option? (which is required for --download-missing
). If I remove that option, everything works, but with that option on Ventura 13.2 and an M1 Mac seems to crash.
Is this a known issue or any advice @RhetTbull ?
breaking
vs.
ย well.. maybe I spoke too soon. I got a different strange error without photokit..
Just to double check @spencerc99 on this new install what's the result of osxphotos --version
to have origin, macOS and osxphotos' version info.
@spencerc99 I'm on Ventura 13.1 / M1 Mac and I've confirmed --use-photokit
works for me.
$ osxphotos --version
osxphotos, version 0.58.2
Python 3.11.2 (main, Feb 16 2023, 02:55:59) [Clang 14.0.0 (clang-1400.0.29.202)]
macOS 13.1.0, arm64
Try running your command with --debug
placed directly after osxphotos export: osxphotos --debug export --album fits...
This should cause osxphotos to crash when it hits the error and produce a crash log. Then post the crash log file here.
here's the latest version
and here's the latest crash run with the debug info (it does seem to be exporting now without --use-photokit
btw)
I don't seem to see a crash log file, what should it look like?
Hi there.
--album fits\ <0001f9e2>
has an emoticon on the name. Can you try to just use --album fits
. Unless you have more albums named with the word "fits" it should only export the one album. osxphotos_crash.log
should be in the folder where you launched osxphotos from. [74405]
normally associated with a process/command launched in the background although you don't use the "&" sign at the end of your command line. So I'm confused. Are you running it on the background?--verbose
options just to see more detail on the steps. Please remove any private data like filenames you may not want to share.
-- you can also add the --dry-run
option which will run the tool as normally but not actually exporting the files. To see if there is any difference. Sorry for not having a solution. Just trying to help out.
The crash log will only be created if there's a crash and it looks like it did not crash the second time. If it's really crashing in the photokit code then this code might not have been called the second time (only gets called to download missing photos) as perhaps all the photos were on disk and not missing this time.
I'm on Ventura / M1 and can't replicate this. Next time it happens, please insert the "--debug" option right after osxphotos and before export and see if you can get it to generate a crash log. Without that I can't figure out where in the code the error is occurring. Because Photos is flaky and errors are unfortunately expected during export, osxphotos export
swallows errors and reports them but doesn't show the offending code unless --debug
is used.
Describe the bug Cannot export on Darwin 13.2
To Reproduce Steps to reproduce the behavior:
94094 Abort trap:
Expected behavior should work
Screenshots
Desktop (please complete the following information):
osxphotos --version
): osxphotos, version 0.58.0