简体中文界面。帖子、指南及政策正文保留原文;未对原文作自动翻译。

same script, wrong arguments on the rebuilt laptop

JoAllen0331 · 2025年11月4日 16:06 UTC

已关闭
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 条回复

SA
SarahBaker0502

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

18
JO
JoAllen0331

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

11
SA
SarahBaker0502

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

22
AM
AmaraBrown0948

Does the shortcut use the Python interpreter you checked?

5
EL
ElenaAllen0340

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
JO
JoAllen0331

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
JO
JonasAllen0285

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
SA
SarahBaker0502

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

22
AM
AmaraBrown0948

Keep that output in the support note too

1
JO
JoAllen0331

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
EL
ElenaAllen0340

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
SA
SarahBaker0502

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

12
JO
JoAllen0331

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
JO
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
JO
JonasAllen0285

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

17

讨论已关闭

此讨论已连续六个月没有活动,现已关闭新回复。 最后活动: .