question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InvalidCharsInPath error for BUILD_DIR while attempting to build project

See original GitHub issue

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!

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Krammycommented, Feb 11, 2019

The same issue arises while trying to build the example project.

0reactions
weilingweicommented, Apr 25, 2021

fs.errors.InvalidCharsInPath: path 'F:\workplace\scrapysite\wlwcms\builds' contains invalid characters good product~

Read more comments on GitHub >

github_iconTop Results From Across the Web

pyfilesystem2 InvalidCharsInPath error when path contains ...
The problem comes when the file I'm trying to delete contains square brackets [ & ], ex: 'Operation Red Sea (Hong hai xing...
Read more >
fs.errors — PyFilesystem 2.4.16 documentation
This error will occur when attempting to move / copy a folder into itself or copying a file onto itself. exception fs.errors. InsufficientStorage...
Read more >
Python's Filesystem abstraction layer
Check that file-like objects returned by FS.openbin : have a seek method that returns the new absolute position when called; have a write...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found