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

Error when exporting distribution #106

Open
petschki opened this issue Jan 16, 2025 · 2 comments
Open

Error when exporting distribution #106

petschki opened this issue Jan 16, 2025 · 2 comments

Comments

@petschki
Copy link
Member

I'm not sure whats going wrong here, but when using the bin/export-distribution script on a development package here (buildout setup on MacOS) I get the following traceback:

Traceback (most recent call last):
  File "/Users/peterm/workspace/cipra/bin/export-distribution", line 288, in <module>
    sys.exit(plone.distribution.cli.export())
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/Users/peterm/workspace/cipra/eggs/plone.distribution-3.0.0b2-py3.13.egg/plone/distribution/cli/__init__.py", line 46, in export
    logger.info(f" Wrote {item.relative_to(path)}")
                          ~~~~~~~~~~~~~~~~^^^^^^
  File "/Users/peterm/.pyenv/versions/3.13.1/lib/python3.13/pathlib/_local.py", line 385, in relative_to
    raise ValueError(f"{str(self)!r} is not in the subpath of {str(other)!r}")
ValueError: '/var/folders/rd/cmj0g605667ctvxbmb3b7rh80000gn/T/plone.exportimportvrvcuxsg/content/__metadata__.json' is not in the subpath of '/Users/peterm/workspace/cipra/src/plonetheme.cipra/src/plonetheme/cipra/distributions/cipra/content'

What I did:

  1. create new Plone site using our customer distribution (based on Classic UI)
  2. create some example content
  3. run the script

Versions:

Plone: 6.1.0b2
Python: 3.13.1

@petschki
Copy link
Member Author

Aha ... turns out that you have to create the subfolder content manually inside your distributions/<name>folder before exporting ... wasn't obvious to me with this traceback ...

@davisagli
Copy link
Member

@petschki Sounds like a legitimate bug, the script should either create the folder automatically or give a better error message.

@davisagli davisagli reopened this Jan 16, 2025
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

No branches or pull requests

2 participants