Skip to content
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

Write README.txt also for collections set with no collections #1101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sebastian-nagel
Copy link
Contributor

Prevent serialize_all from failing on an empty collection set when writing the README.txt:

INFO 2022-03-04 03:00:54,182 63 ui.serialize Serializing <Collection Set 72 "...">
ERROR 2022-03-04 03:00:54,186 63 apscheduler.executors.default Job "serialize_all (trigger: cron[hour='3', minute='0'], next run at: 2022-03-05 03:00:00 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/apscheduler/executors/base.py", line 125, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/opt/sfm-ui/sfm/ui/serialize.py", line 550, in serialize_all
    serializer.serialize_all()
  File "/opt/sfm-ui/sfm/ui/serialize.py", line 50, in serialize_all
    self.serialize_collection_set(collection_set, force_serialize=force_serialize)
  File "/opt/sfm-ui/sfm/ui/serialize.py", line 59, in serialize_collection_set
    get_collection_set_path(collection_set, sfm_data_dir=self.data_dir))
  File "/opt/sfm-ui/sfm/ui/serialize.py", line 271, in _write_readme
    with codecs.open(readme_filepath, "w", encoding="utf-8") as f:
  File "/usr/local/lib/python3.6/codecs.py", line 897, in open
    file = builtins.open(filename, mode, buffering)
No such file or directory: '/sfm-data/collection_set/aa0cbd1e5c374c0a9c67cf2ce45caf9b/README.txt'

- prevent serialize_all from failing on an empty collectionset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant