Skip to content
Discussion options

You must be logged in to vote

Does the problem go away when I change 'params.b' to 'b'?

Because boot.py will now successfully import boot_x at actual boot time.

Why doesn't uP report the error in BOOT_X_PARAMS.PY.?

It does (see my example). I suspect you're not seeing it in Thonny for some reason.

Just for completeness, here's your exact example using the official tools. First shows the contents of the three files on the device, and the error message being shown at boot time.

$ mpr cat :boot.py
from boot_x import boot_x
boot_x()

$ mpr cat :boot_x.py
import boot_x_params as params

def boot_x():
    print("Hello from boot_x")
    print(params.a)
    print(params.b)

$ mpr cat :boot_x_params.py
a=42
params.b="Oh no…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@jimmo
Comment options

@DS256
Comment options

@jimmo
Comment options

Answer selected by DS256
@DS256
Comment options

@jimmo
Comment options

@DS256
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants