Error creating dataset from D drive
Opened this issue ยท 4 comments
- Whombat version: 0.4.1 (downloaded as a zip file from releases)
- Python version: 3.11
- Operating System: Windows
Hello.
I've been struggling to find an easy to use wildlife call annotator recently and have been looking forward to using whobat, so I'm glad I can finally use it.
Description of issue
When I try to create a new dataset with a directory in the D drive (like D:/path/to/my/directory), I get a "Failed to create dataset" error on the GUI. No message is displayed in the terminal window.
This error does not occur when a directory is in the C drive, the default storage.
I store most of my audio data on the D drive as it's too large to store on the C drive.
Do you have any idea how to get access to the D drive from whombat?
Sorry if I missed something already mentioned in the user guide.
Thank you for your efforts in developping whombat!
Hey @kaede-kmr!
Thanks for giving Whombat a try!
Apologies for the minimal error message you encountered. Let me explain why this occurred: Whombat is designed to access files from a common directory, which defaults to your home directory. This is a security measure, particularly useful if Whombat is hosted on a shared server, ensuring the app cannot access sensitive files. However, it is indeed possible to customize this setting. Here's how to do it:
- Locate the Whombat files in the Application Data Folder. On Windows, this directory is typically found at
C:\Users\<username>\AppData\Local\whombat
. The AppData folder is usually hidden, but you can access it through the Windows Search or by enabling hidden folders in your Settings. - Once you've found the Whombat data directory, look for a file named
settings.json
. You'll need to edit this file manually. Inside settings.json, you'll find a section resembling"audio_dir":"<your home>"
. Change the value to your desired directory (e.g., the D drive). Ensure to enclose the path in quotes to prevent the app from reverting to the original settings.
Any datasets you've previously created may become broken after this change, as Whombat relies on the audio_dir
path to locate recordings. Also, in rare circumstances, the settings may revert to their original state. If Whombat fails to find the registered recordings, double-check the audio_dir
path using these steps.
Many thanks for the issue! I'll ensure these instructions are included in the next version of our documentation and added to the FAQ for easy reference. Additionally, I'll work on providing more informative error messages in such situations in future releases.
Hope this helps,
Santiago
TODO
- Include these instructions in the documentation
- Provide a better error message when user tries to create a dataset outside the
audio_dir
Hi Santiago,
thanks for your great work with Whombat!
I have the same problem but different projects are also stored on different
hard drives. I think it is not practical to change the autodir like that.
Any idea on how to solve this?
Greetings from Austria,
Robin
Hey Robin,
Thanks for your kind words! ๐
Yeah, supporting datasets across different disks in Whombat would be great, and it's a common scenario. Unfortunately, at the moment, Whombat doesn't directly support this feature.
However, there's a workaround, although it's a bit impractical. Here's how you can set it up:
- Start by installing Whombat via pip: pip install whombat.
- After installation, you'll need to run Whombat through the terminal using the command
WHOMBAT_DATA_DIR=<path_to_instance1> python -m whombat
. This command directs Whombat to store all data and settings in the specified directory, rather than the default location. You'll need to use the same command every time to ensure Whombat reads from that location. - You can adjust the audio_dir in the settings file created in this directory to point to your first drive.
- Repeat steps 2 and 3 for another directory, adjusting the settings accordingly for the other drive.
While changing how Whombat handles file paths to support this scenario would be an ideal solution, it might require significant changes to the codebase and may take some time to implement. But I'll add it to the TODO list.
Anyways, thanks again for giving Whombat a try, and let me know if you have further questions.
Santiago