Closed JamesDBartlett3 closed 1 year ago
Have you tried setting one of TMPDIR
, TEMP
or TMP
as an environment variable? Looks like bandcampsync uses Python's tempfile
, which should respect any of those variables.
Have you tried setting one of
TMPDIR
,TEMP
orTMP
as an environment variable? Looks like bandcampsync uses Python'stempfile
, which should respect any of those variables.
Yep, I already applied that workaround on my system. However, I still think every app should let users specify where it should save its files, even the temporary ones.
Thanks, this was a reasonable suggestion. While setting the TEMP
ENV var is widely known, adding a flag to manually specify the temp directory path is a nice to have feature. This is in the newly released v0.3.4
.
Wow, that was an incredibly fast turnaround, and thanks for taking my suggestion! Also, FYI, here's where I first heard about your tool the other day, just in case you'd like to engage in the conversation there: @oleksiy@sonomu.club on Mastodon
No problem, adding a CLI arg and a single parameter isn't exactly much work :)
Hardware
Software
Error message
Diagnosis
I believe this error is due to an unfortunate collision between
bandcampsync
's default temp storage location andOpenMediaVault
's overabundance of caution with regards to flash-based storage devices. Here's what I think is happening:bandcampsync
downloads a zip file from bandcamp.com, it saves that file inside a new directory in/tmp
. Then, it extracts the zip file, putting the contents in another new directory in/tmp
. Then, it moves the extracted files to the destination specified by the user with the-d
parameter. And finally, it cleans up after itself by recursively deleting the two new directories it created in/tmp
.OpenMediaVault
detects that it is running on a Raspberry Pi booted from a microSD card, it tries to prevent that microSD card from burning out prematurely due to excessive write cycles by creating a special RAMDisk from available system RAM, and symlinking all of the usual "chatty" filesystem locations (/tmp
,/var/log
,/var/spool
, etc.) to that. Then, it creates a cronjob which synchronizes the contents of the RAMDisk to permanent storage on an hourly schedule.OpenMediaVault
's RAMDisk. Whenbandcampsync
downloads a particularly hefty file from bandcamp.com (in this case, a 2.5 GiB zip file, which unzips to a folder roughly the same size), stores it in/tmp
(RAMDisk), and then also extracts that same file to/tmp
, it runs out of "storage" space, regardless of how much free space is actually available in the destination directory.Possible solution
One way to avoid this problem would be to add an optional temp directory preference parameter (
-t
/--temp
, perhaps?) tobandcampsync
, with several options:/tmp
(default behavior if user does not pass-t
parameter with a valid value)-t --in-place
: Put temp files in a temp directory under the user's specified destination directory-t '~/myTemp'
: Put temp files in a custom temp directory pathWilling to help develop & test
I'm more than willing to help develop and test a solution to this problem, but I'm not sure where to start. I've done a fair amount of Python development, though I have never created a pip package or Docker container, written CI/CD tests of any kind, etc. If you can guide me through the process of getting a local dev environment up and running, then I'd be happy to take a crack at adding the
-t
parameter myself, and submitting a PR once it's done.