-
Notifications
You must be signed in to change notification settings - Fork 61
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
InvalidCharsInPath error for BUILD_DIR while attempting to build project #134
Comments
The same issue arises while trying to build the example project. |
Can confirm that I am also running into this.
settings file (inherits from base settings file)
|
Is there a unicode or special character in your file name? |
There is not. |
Even if there was, there should be some code to filter that out. Something like:
|
Hmm. Any idea what's causing it? Can you give me some more information about your config or data inputs that might help us sleuth this out? |
I believe this is a coding error on part of the module. My configurations are fairly standard for a Django project. In the base setting file, I define the base directory as follows:
This allows me to refer to file and folder locations using relative paths, freeing me to develop within Windows and Linux environments. |
I don't doubt there's a bug, I'm just struggling to find it so we can craft a patch. All of my tests are currently passing. So I suspect there is something I'm missing. What is the path that is failing? |
Are all of you guys on Windows? |
I am on Windows 10. But my system should be OS-agnostic. |
I'm on Windows 10. Maybe it's got something to do with my storage drive being F instead of C? That's the only reason I can think of why it's complaining of invalid characters in the path. I have two drives, one for my Windows installation which is an SSD, and one for general storage which is an HDD. |
Just to throw my voice into the mix. I'm experiencing this issue, too. Python 3.7 in virtual environment on, windows 10. I also can't seem to get a relative path off the project to write where I want. Specifying EDIT: EDIT 2: |
@jaycle, in my government workplace, most developers are expected to work on Windows, and Docker is not permitted nor is WSL (Windows sub-system for Linux). A pull request would enable me to use django-bakery for a number of projects rather than django-distill. I prefer to user interface of django-bakery because a lot less boilerplate will be needed. |
This line, https://github.com/datadesk/django-bakery/blob/2c9c495e4e8faca7b81fa57635d1631933f14171/bakery/views/base.py#L150, is problematic. If PyFilesystem will not allow backslash, then paths must be concatenated without using |
|
I'm getting an error with InvalidCharsInPath while trying to retrieve the BUILD_DIR.
In settings.py:
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
BUILD_DIR = os.path.join(BASE_DIR, 'builds')
I can't think of why it would be failing to recognise characters. The characters in the path specified by the error message don't seem to be any issue. This bug remains with or without the forward slash after builds.
Every time I use the
manage.py build
command, this error shows up:Traceback (most recent call last): File "F:\Users\Mark\Documents\GitHub\Portfolio\portfolio\manage.py", line 15, in <module> execute_from_command_line(sys.argv) File "F:\Users\Mark\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\__init__.py", line 381, in execute_from_command_line utility.execute() File "F:\Users\Mark\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\__init__.py", line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "F:\Users\Mark\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\base.py", line 316, in run_from_argv self.execute(*args, **cmd_options) File "F:\Users\Mark\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\base.py", line 353, in execute output = self.handle(*args, **options) File "F:\Users\Mark\AppData\Local\Programs\Python\Python36-32\lib\site-packages\bakery\management\commands\build.py", line 97, in handle self.set_options(*args, **options) File "F:\Users\Mark\AppData\Local\Programs\Python\Python36-32\lib\site-packages\bakery\management\commands\build.py", line 143, in set_options if not self.fs.exists(self.build_dir): File "F:\Users\Mark\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fs\base.py", line 489, in exists self.getinfo(path) File "F:\Users\Mark\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fs\osfs.py", line 264, in getinfo _path = self.validatepath(path) File "F:\Users\Mark\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fs\osfs.py", line 643, in validatepath return super(OSFS, self).validatepath(path) File "F:\Users\Mark\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fs\base.py", line 1475, in validatepath raise errors.InvalidCharsInPath(path) fs.errors.InvalidCharsInPath: path 'F:\Users\Mark\Documents\GitHub\Portfolio\portfolio\builds' contains invalid characters
I'd appreciate any help!
The text was updated successfully, but these errors were encountered: