Closed gilga2024 closed 3 weeks ago
Your file directory copied into OneTrainer doesn't seem to include a blank/space --> '/mypath/trainingdata/abc' not sure why you would want a blank space but that might be the issue?
Yes, it does. At least in the GUI. I chose the directory using the file picker. The error message shows, that the blank space at the end is lost on the way from gui/settings to the data import/caching process. Hence, the error message shows "abc" instead of "abc " at the end. Just follow the steps to repeat to check yourself.
I usually would not want a whitespace at the end of directory names. This was just a typo. But it drove me nuts that this error occurred (several other concepts just loaded fine), without an apparent reason. Once I removed the whitespace from the directory name, the error was gone. Although it might be uncommon, does not make it no bug.
PS: Not gonna answer to @velourlawsuits anymore.
It is not considered best practices to include spaces in your filenames for a variety of reasons. I wouldn't consider this a bug if it wasn't intentional.
It is not considered best practices to include spaces in your filenames
Sorry, just laughed very hard at this.
Spaces in filenames as well as directory names are the most common thing. It might not be "normal" at the end of a directory name, but anyways no implementation that handles filenames/directory names/paths should call a "trim"-operation or something similar somewhere in the code. That's probably what happens. People might make a similar typo like me and maybe there is other more "bad" cases associated to the code that produces this bug. That's why I raised this issue (and why bugs tickets are created in general). It's not severe, far from it. But still relevant.
The dev team may do with it whatever they like. I know my way around it.
Odd sense of humor. Also you're wrong :) good luck.
The cure here could be worse than the disease. A lot of people paste pathnames into UI fields, and paste output often includes extraneous whitespace on the ends. I think we need to balance whether fixing this just opens up more problems for people.
Ok, this sounds reasonable and is a hard one to solve... one could trim in case copy & paste was used / a path was manually entered and not trim if the file chooser was used. But this sounds inconsistent.
Maybe showing a warning message in case something that seems dangerous/wrong was entered into this field would make sense!? For example a small red explanation mark beside the input field and a warning message in the mouse hover text.
The UI concept itself could also be used for other fields in the future (since people often seem to run into these kinds of problems judging from issues in the tracker)...
What happened?
An error message that a concept directory could not be found was shown when preparing the dataset for training / caching.
Steps to reproduce (on a linux machine):
Assumed problem/error in code: Somewhere in the pipeline that handles concept directory a "trim" method is called that removes the blanks/spaces at the end.
What did you expect would happen?
The training should start without an error message
Relevant log output
Output of
pip freeze
No response