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

theme_barceloneta: The filename, directory name, or volume label syntax is incorrect #510

Open
me-kell opened this issue Jul 24, 2022 · 2 comments

Comments

@me-kell
Copy link
Contributor

me-kell commented Jul 24, 2022

  • Operating System: windows

Description

In Windows when generating a theme_barceloneta the path in the variable package.dottedname in the mrbob.configurator is not correctly splitted by "/" because Windows uses "\" as path separator. Subsequently package.namespace is wrong. Specially if the path contains dots.

The source of the problem is (

)

split("/") should be replaced with split(os.sep) for it to work in Windows.

I can confirm this solves the problem in Plone-5.2.8 and Plone-5.2.9.

AFAICS this issue should affect Plone-6x too!

What I Did

C:\Users\vagrant\Plone-5.2.9-zeo\py-3.8.10.final.0\Scripts\activate.bat

cd C:\Users\vagrant\Plone-5.2.9-zeo\zeocluster\src

rmdir /q/s C:\Users\vagrant\Plone-5.2.9-zeo\zeocluster\src\packagename.subpackagename

copy /Y con C:\Users\vagrant\Plone-5.2.9-zeo\zeocluster\src\addon.ini
[variables]
author.name = theAuthor
author.email = [email protected]
author.github.user = gitusername
package.description = An add-on for Plone
package.git.init = True
package.git.autocommit: True
plone.version = 5.2.8
python.version = python3.9
vscode_support = False
^Z

C:\Users\vagrant\Plone-5.2.9-zeo\zeocluster\bin\mrbob --config C:\Users\vagrant\Plone-5.2.9-zeo\zeocluster\src\addon.ini -O packagename.subpackagename bobtemplates.plone:addon

copy /Y con C:\Users\vagrant\Plone-5.2.9-zeo\zeocluster\src\theme_barceloneta.ini
[variables]
subtemplate_warning = n
theme.name = My Theme
package.git.init = False
package.git.autocommit: False
^Z

cd C:\Users\vagrant\Plone-5.2.9-zeo\zeocluster\src\packagename.subpackagename

C:\Users\vagrant\Plone-5.2.9-zeo\zeocluster\bin\mrbob --config C:\Users\vagrant\Plone-5.2.9-zeo\zeocluster\src\theme_barceloneta.ini -O packagename.subpackagename bobtemplates.plone:theme_barceloneta

Traceback (most recent call last):

  File "C:\users\vagrant\Plone-5.2.9\zeocluster\bin\mrbob-script.py", line 31, in <module>
    sys.exit(mrbob.cli.main())
  File "c:\users\vagrant\plone-5.2.9\buildout-cache\eggs\cp38m\mr.bob-0.1.2-py3.8.egg\mrbob\cli.py", line 181, in main
    c.render()
  File "c:\users\vagrant\plone-5.2.9\buildout-cache\eggs\cp38m\mr.bob-0.1.2-py3.8.egg\mrbob\configurator.py", line 196, in render
    render_structure(self.template_dir,
  File "c:\users\vagrant\plone-5.2.9\buildout-cache\eggs\cp38m\mr.bob-0.1.2-py3.8.egg\mrbob\rendering.py", line 94, in render_structure
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\Users\\vagrant\\Plone-5.2.9\\zeocluster\\src\\packagename.subpackagename\\src\\C:\\Users\\vagrant\\Plone-5'```
@me-kell
Copy link
Contributor Author

me-kell commented Nov 24, 2022

The problem occurs with all subtemplates. See #531

me-kell added a commit to me-kell/bobtemplates.plone that referenced this issue Nov 24, 2022
me-kell added a commit to me-kell/bobtemplates.plone that referenced this issue Nov 25, 2022
me-kell added a commit to me-kell/bobtemplates.plone that referenced this issue Nov 25, 2022
me-kell added a commit to me-kell/bobtemplates.plone that referenced this issue Nov 25, 2022
@petschki
Copy link
Member

can this be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants