FIXED: [2025.31760] TDPyEnvManagerHelper use in Samples .bat gives error

I am beginning to test methods of automating python installs, and want to add this to a .bat anyone can before first run. Was excited to read that there is already a batch example provided in the Samples directory!

When using this batch directly and when simplifying it to the following:

set TD_INSTALL_PATH=C:\Program Files\Derivative\TouchDesigner.2025.31760
"%TD_INSTALL_PATH%\bin\python.exe" "%TD_INSTALL_PATH%\bin\Lib\tdutils\TDPyEnvManagerHelper.py" --clean --mode "Py vEnv" --pythonVersion "3.11" 

I see the following error:

C:\Users\{USERNAME}\OneDrive\Desktop\TD Test 20251128>set TD_INSTALL_PATH=C:\Program Files\Derivative\TouchDesigner.2025.31760

C:\Users\{USERNAME}\OneDrive\Desktop\TD Test 20251128>"C:\Program Files\Derivative\TouchDesigner.2025.31760\bin\python.exe" "C:\Program Files\Derivative\TouchDesigner.2025.31760\bin\Lib\tdutils\TDPyEnvManagerHelper.py" --clean --mode "Py vEnv" --pythonVersion "3.11"
Traceback (most recent call last):
  File "C:\Program Files\Derivative\TouchDesigner.2025.31760\bin\Lib\tdutils\TDPyEnvManagerHelper.py", line 1533, in <module>
    main(args)
  File "C:\Program Files\Derivative\TouchDesigner.2025.31760\bin\Lib\tdutils\TDPyEnvManagerHelper.py", line 1430, in main
    helper.logger.debug("Starting TDPyEnvManagerHelper...")
    ^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'debug'

Hi @cem_futuretense

Thanks for the report and sorry about that. Might be a regression I introduced.

I will have a look.

Best,

Michel

1 Like

Hi @JetXS !!

Thanks for looking. Assuming this works, is there a recommended method to “Create vEnv from requirements” via the CLI? I can enable the venv then pip install unless there are any gotchas?

I want to use this method to create a more standard “.venv” named folder to be hidden from git and reliably in the same place for vscode workspace and other relative referencing. So I can use the same boilerplate between projects without adjusting a bunch of absolute paths.

Easier for install technicians to just run a .bat and not have to worry about project folder portability.

Thanks for this tool, huge upgrade :folded_hands:

This will be fixed in the next build we post.

The env is activated after setup in the CLI, so you can just add a pip call in your bat file. If a requirements.txt file is present it should install it automatically.

Best,
Michel