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 creating presets containing spaces or special characters #2

Open
danielkrafft opened this issue Dec 15, 2023 · 0 comments
Open

Comments

@danielkrafft
Copy link

I was using Assemblme to create build animations for sets with around 850 pieces. I applied the preset "Standard Build" and changed some of the settings. I attempted to name a new preset "Medium Set" and click create.

Clicking on the create button with a bad character results in the following error:

Description of the Problem:

Blender Version: 004.000.000
Addon Version: 1, 7, 0
Platform Info:
system = Windows
platform = Windows-10-10.0.19045-SP0
version = 10.0.19045
python = 3.10.13
Error:
EXCEPTION (<class 'FileNotFoundError'>): [Errno 2] No such file or directory: 'C:\Users\XXXX\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\presets\assemblme\medium\ set.py'
C:\Users\XXXX\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\assemblme_v1-7-0\operators\presets.py
000 0110:write_new_preset() f = open(new_preset_path, "w")
001 0061:execute() self.write_new_preset(new_preset_name)

I was able to rectify the problem by naming the preset "Medium". Upon further testing, it seems the problem arises when including a space character in the preset name, as well as when including some special characters (!, #, $, ^, *) The following isn't necessarily an issue, but I also noticed that using an underscore "Medium_Set" will result in a preset named "Medium set", removing the underscore and capitalization of the second word. Naming a preset "MEDIUM_SET" will result in a preset named "Medium set" as well.

It would likely be preferable to pop up a message warning users about using some these characters, or supporting their use.
Great addon by the way!

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

1 participant