New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command fails after build. Database location error? #31
Comments
Edit: fixed PyYAML package name Note: you should do this in a virtual env. Alternatively, use pipx to install (see the README.md) |
Note: You might also try this: then attempt to install again. If you still have problems, let me know. |
I think that the root cause of the original problem was that the photo library was empty. The computer wasn't logged in to my iCloud account. I haven't gotten back to testing with a photo in the database, but this may be enough to locate where in the code to test the edge case of an empty library and stop the program more gracefully. |
Thanks -- I'll build a test case for empty library and see if I can replicate your error. |
I built a test case for empty database but was not able to replicate your error. In my test case, the empty database opens fine and returns 0 results as expected. See: osxphotos/tests/test_empty_library_4_0.py Lines 87 to 92 in 588ba4b
Your error looks like a PyYAML error related to sort_keys which was added to PyYAML in 5.1 (yaml/pyyaml#254). Try updating PyYAML and see if you still get the error. |
PyYAML >= 5.1.2 dependency added to setup.py and requirements.txt |
No matter what command or options I specify I get something like the following:
(base) rpn01@R5057499 ~ 0 $ osxphotos --db ~/Pictures/Photos\ Library.photoslibrary/ info
Traceback (most recent call last):
File "/Users/rpn01/anaconda3/bin/osxphotos", line 11, in
load_entry_point('osxphotos==0.17.8', 'console_scripts', 'osxphotos')()
File "/Users/rpn01/anaconda3/lib/python3.7/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/Users/rpn01/anaconda3/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/Users/rpn01/anaconda3/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/rpn01/anaconda3/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/rpn01/anaconda3/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/Users/rpn01/anaconda3/lib/python3.7/site-packages/click/decorators.py", line 27, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "/Users/rpn01/anaconda3/lib/python3.7/site-packages/osxphotos-0.17.8-py3.7.egg/osxphotos/main.py", line 128, in info
File "/Users/rpn01/anaconda3/lib/python3.7/site-packages/yaml/init.py", line 200, in dump
return dump_all([data], stream, Dumper=Dumper, **kwds)
TypeError: dump_all() got an unexpected keyword argument 'sort_keys'
(base) rpn01@R5057499 ~ 0 $
I just cloned and built the program, so I'm not sure what I've done wrong...
The text was updated successfully, but these errors were encountered: