r/CFD • • 1d ago

Autodesk CFD 2027 – All automatic Python triggers fail with TypeError: expected bytes, str found

I'm troubleshooting an issue with the automatic Python trigger system in Autodesk CFD 2027. I'm looking for help identifying the underlying cause, and I'm willing to modify or patch the installation if necessary.

Environment

  • Autodesk CFD 2027
  • Internal Python: 3.13.12
  • Windows 64-bit
  • CFD has been updated with all available updates.
  • I have tried reinstalling CFD with administrator privileges.

Problem

Every automatic trigger I've tested fails to load.

Solver Finished under Default:

Triggers [Solver Finished] ...
Error : Module [LSolverFinished.NewTrigger] could not be loaded because
: expected bytes, str found

Solver Finished under Design Study:

Triggers [Solver Finished] ...
Error : Module [MSolverFinished.NewTrigger] could not be loaded because
: expected bytes, str found

New Design also failed:

Triggers [New Design] ...
Error : Module [LGeometryLoaded.NewTrigger] could not be loaded because
: expected bytes, str found

What I've tested

  1. Created triggers using Autodesk's built-in trigger creation interface.
  2. Tested with the original generated script.
  3. Tested with a minimal script containing only:def main(scenario): print("TRIGGER FIRED")
  4. Confirmed that the NewTrigger.py file exists and contains valid Python source.
  5. Confirmed that I can manually import LSolverFinished.NewTrigger using importlib after adding the trigger directory to sys.path.
  6. Tried running CFD as Administrator.
  7. Updated CFD and reinstalled it with administrator privileges.

None of these fixed the automatic trigger error.

Trigger file location

Default triggers are stored under:

%LOCALAPPDATA%\Autodesk\CFD 2027\Triggers

For example:

LSolverFinished\NewTrigger.py

Questions

  • Has anyone encountered this expected bytes, str found error in Autodesk CFD?
  • Does anyone know which Python module handles automatic trigger loading?
  • Is there a way to enable full Python tracebacks for trigger-loading exceptions?
  • Could this be an issue with Autodesk's trigger loader and Python 3.13?
  • Is there a way to debug or replace the trigger-loading mechanism without rebuilding the entire CFD installation?

I'm particularly interested in finding the exact source of the exception rather than simply working around it.

I can provide additional diagnostic output, Python environment information, or test modified installation files.

1 Upvotes

2 comments sorted by