Unable to release temporary directories error

51 views
Skip to first unread message

Hunter Lehmann

unread,
Jun 2, 2026, 2:54:20 PMJun 2
to PreTeXt support
Hi all,

On my work computer (which I don't have admin access to and so has had Python/npm installed in my user folder in Windows), I get an error message that PreTeXt is unable to release temporary directories when trying to build any target using the CLI.

Looking at the log it seems the path to the temporary directory that is displayed is garbled: HLEHMA~1 should be hlehmann3

The project builds fine in a codespace and on my home computer (with the project files in the same C:/user/Documents/GitHub/MATH4107 structure; there the temporary directory is at C:/hlehm/AppData/Local/Temp/ptx-****).  

Any idea what is going on?  

Best,
Hunter
20260602-144614.log

Oscar Levin

unread,
Jun 2, 2026, 2:56:49 PMJun 2
to pretext...@googlegroups.com
Is your Documents folder managed by OneDrive?  I think this has been the cause of similar issues on Windows for others.  

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/761ad9ba-ea08-4b9c-a26e-beaea0612721n%40googlegroups.com.

Sean Fitzpatrick

unread,
Jun 2, 2026, 2:57:02 PMJun 2
to pretext...@googlegroups.com

I run into this whenever I try to build from a folder that is backed up by OneDrive.

If I copy the project to a folder that is not backed up, I don't get the error.

One way to avoid the error is to run 'pretext -v debug build (target)'. With debugging on, the CLI doesn't try to remove the temporary directories.

Hunter Lehmann

unread,
Jun 3, 2026, 9:13:34 AMJun 3
to PreTeXt support
I thought OneDrive might the culprit, but the problem is not that the project itself is in a backed up folder.  I moved the folder to C:\MATH4107, which is definitely above the OneDrive managed folders and still got the same error. Running with the debug option set did allow it to build.

Hunter Lehmann

unread,
Jun 3, 2026, 9:14:52 AMJun 3
to PreTeXt support
The issue also persists from the folder at C:\MATH4107 when OneDrive's application is turned off so that nothing is syncing.

Joseph DiMuro

unread,
Jun 4, 2026, 4:52:36 PMJun 4
to PreTeXt support
Hi all. I'm experiencing the same error on my office computer, so I hope I can be a helpful data point here.

I'm working on two PreTeXt projects, located in the following folders:

C:\Users\myusername\ptx\exams\
C:\Users\myusername\ptx\syllabi\

(I think I need to keep my username private. :-) Suffice it to say, it's purely alphanumeric: no spaces or special characters.)

I've been getting the temporary directories error with my syllabi project, but NOT with my exams project. I was using CLI 2.39.0; upgrading to 2.41.0 had no effect. I do have OneDrive on my computer, but OneDrive does not back up these folders, so that's not the issue.

I have no idea what is making one project succeed and the other one fail. :-/

-Joseph

Joseph DiMuro

unread,
Jun 4, 2026, 5:00:22 PMJun 4
to PreTeXt support
Clarification: I don't just have one PreTeXt project in my exams folder. I have a few projects, each one for a single class. But the syllabi stuff is one big project. (I'm guessing this doesn't matter, but still...)

-Joseph

Oscar Levin

unread,
Jun 4, 2026, 10:50:03 PM (14 days ago) Jun 4
to pretext...@googlegroups.com
This is all very strange.  It would be great to get this sorted out, but I'm not really sure how to go about testing.  The problem is that to get the debug information, you need to run debug and that doesn't try to delete the temporary directories.  

Joseph: any chance you are using a different shell between those two projects?  The other thought I had was whether there are differences in permissions on those folders.

Oh, maybe it depends on what file types are in the temporary directories?  What if you try running with `-v debug` and then looking at the temporary directories and seeing what sorts of files are in them?  Or if you can find the ones that give you errors?

Hunter Lehmann

unread,
Jun 5, 2026, 9:59:19 AM (13 days ago) Jun 5
to pretext...@googlegroups.com
Gemini suggests it’s probably an overzealous antivirus or backup system locking some file in the temporary directory right after creation since I can delete those directories fine later. It suggested a way to look for what might be doing it but that needs admin privileges- I will try to get IT to help me look into it next week and report back.

The files in mine all look normal, just fonts, css, js, and html. The issue happens whether I am using a Powershell terminal or running the command palette build command from VS code. But it also appears to be sort of a harmless error in that literally the only thing wrong is the inability to delete those directories - the output directory of my project folder is getting properly updated with the newly built files.

Hunter

You received this message because you are subscribed to a topic in the Google Groups "PreTeXt support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-support/xgOTno004Hc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/CAOU9BaWZCgVCE%3DCmzgVbAj4BbuzYfjvHb-ksNJc%2B9sQWRLyMNg%40mail.gmail.com.

Rob Beezer

unread,
Jun 5, 2026, 10:45:43 AM (13 days ago) Jun 5
to pretext...@googlegroups.com
Oscar - would it help if we caught these errors and just left a message that the
directories were being left behind? They will go away on a reboot, and anybody
bothered by their presence should know how to remove them (and if they *still*
can't remove them, then the ball is in their court).

Rob
> __
>> <https://groups.google.com/d/msgid/pretext-
>> support/761ad9ba-ea08-4b9c-a26e-
>> beaea0612721n%40googlegroups.com?
>> utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "PreTeXt support" group.
>
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pretext-suppo...@googlegroups.com
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/156d94c5-7183-4a2b-879b-954790830379n%40googlegroups.com
> <https://groups.google.com/d/msgid/pretext-
> support/156d94c5-7183-4a2b-879b-954790830379n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "PreTeXt support" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/
> pretext-support/xgOTno004Hc/unsubscribe <https://groups.google.com/d/topic/
> pretext-support/xgOTno004Hc/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to pretext-
> support+u...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/CAOU9BaWZCgVCE%3DCmzgVbAj4BbuzYfjvHb-
> ksNJc%2B9sQWRLyMNg%40mail.gmail.com <https://groups.google.com/d/msgid/
> pretext-support/CAOU9BaWZCgVCE%3DCmzgVbAj4BbuzYfjvHb-
> ksNJc%2B9sQWRLyMNg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> CAO%2BsSVKsPisVhX%2BPOJpaB4X_S7jyrjGeTB-cMWyBDqsn4suAKA%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-support/
> CAO%2BsSVKsPisVhX%2BPOJpaB4X_S7jyrjGeTB-cMWyBDqsn4suAKA%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Oscar Levin

unread,
Jun 5, 2026, 11:03:57 AM (13 days ago) Jun 5
to pretext...@googlegroups.com
Thanks Hunter, that's very informative.

Rob, yes, we should just do that.  I don't think we even need a warning (and certainly not an error).  I can't submit a PR later today.

Rob Beezer

unread,
Jun 5, 2026, 11:46:10 AM (13 days ago) Jun 5
to pretext...@googlegroups.com
Thanks, Oscar. Let's say something (not at the most verbose level!), for support purposes, and so authors/publishers know this is not normal.

I'm happy to do a PR if you've got other irons in the fire.

Rob
Reply all
Reply to author
Forward
0 new messages