same script, wrong arguments on the rebuilt laptop

JoAllen0331 · 4 Nov 2025, 16:06 UTC

Closed
JO
JoAllen0331
I have two maintenance laptops on the bench. Our FR10 status script works on the older one. The rebuilt one complains about an unexpected argument before any connection attempt. The job files have been checked. The Python environment has not. There are three SDK directories on the rebuilt machine and the shortcut points at a fourth folder containing our scripts. I need to identify what it actually imports before the next person spends another shift reinstalling things.

15 replies

SA
SarahBaker0502
Replying to JoAllen0331

Print the imported module's file path. Start there, no reinstall needed.

18 points
JO
JoAllen0331
Replying to SarahBaker0502

It is importing from a copy inside the script folder. I expected the installed package. The older machine reports a different location.

11 points
SA
SarahBaker0502
Replying to JoAllen0331

There's your first difference. Compare those copies before changing either machine.

22 points
AM
AmaraBrown0948
Replying to JoAllen0331

Does the shortcut use the Python interpreter you checked?

5 points
EL
ElenaAllen0340
Replying to AmaraBrown0948

That shortcut question matters for the handover. A technician may get a different result from the desktop icon than you get from a terminal.

13 points
JO
JoAllen0331
Replying to AmaraBrown0948

Good catch, Amara. I checked from a terminal. The icon names an interpreter in a separate environment. I have not checked that import yet.

15 points
JO
JonasAllen0285
Replying to JoAllen0331

I once chased a missing package that existed perfectly happily in the wrong interpreter. Half an afternoon to discover we'd been having two different conversations with Python.

1 points
SA
SarahBaker0502
Replying to JoAllen0331

Jo, print the interpreter path and module path from the launched script together.

22 points
AM
AmaraBrown0948
Replying to SarahBaker0502

Keep that output in the support note too

1 points
JO
JoAllen0331
Replying to SarahBaker0502

The icon loads the same local SDK copy after all. Different interpreter, same imported file. The callable in that copy takes different arguments from the one on the working laptop.

5 points
EL
ElenaAllen0340
Replying to JoAllen0331

Who maintains the script? They should choose the intended SDK version; the newest folder is not necessarily the one this script was written for.

15 points
SA
SarahBaker0502
Replying to ElenaAllen0340

Yep. Match the documented call to that version, don't just remove the argument until it runs.

12 points
JO
JoAllen0331
Replying to ElenaAllen0340

Our controls engineer owns it. She found the version note in her old handover email. That agrees with the working laptop, including the argument used here.

10 points
JO
JoAllen0331
Replying to JoAllen0331

We rebuilt the intended environment and moved the stray SDK copy out of the script directory. Both launch routes now report the agreed paths and the read-only status check works. The shortcut details are finally in the handover.

18 points
JO
JonasAllen0285
Replying to JoAllen0331

Nice to hear the icon got checked as well. That's usually where the second surprise waits.

17 points

Discussion closed

This discussion is closed to new replies after six months without activity. Last activity: .