-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Directory component fails to open folders starting with '\n' #3997
Comments
Hey @ChrisBriend-Relic! 👋 I'm here to help you with any bugs, questions, or contributions you have. Let's squash those bugs together! The issue you're encountering seems to be related to how escape sequences are handled in directory paths. In Python, the backslash ( To address this, you can use raw strings in Python by prefixing the string with If you're using the Directory component in Langflow and specifying paths directly, ensure that the paths are correctly formatted to prevent escape sequence interpretation. If the issue persists, it might require a code update in Langflow to handle such cases more gracefully. |
Using string literals doesn't work, as the input is not python but the web UI for the component. |
hi @ChrisBriend-Relic hope you are doing well! Follow up this PR: #4101 with the fix! Thanks!! |
Thanks! Much appreciated. |
Bug Description
When using the Directory component to load files, if my folder starts with the letter n, the '\n' sequence won't be escaped properly, resulting in the folder not being considered valid.
The error seems to be raised from langflow\base\data\utils.py:56 in retrieve_file_paths
Reproduction
Error building Component Directory:
Path c:\test
ew_folder must exist and be a directory.
Expected behavior
Paths containing a folder with any alphanumerical combination should be supported
Who can help?
@ogabrie
Operating System
Win11
Langflow Version
1.0.18
Python Version
3.12
Screenshot
Flow File
No response
The text was updated successfully, but these errors were encountered: