Script runs on one Linux computer, but not another

I wrote an Python obspy script. It runs happily on my Linux computer (Debian bookworm/sid), but does not run on a supposedly identical computer. The error I get is:

Traceback (most recent call last):
File “/home/seisan/bin/”, line 452, in
File “/home/seisan/bin/”, line 250, in main
stWant +=
File “/home/seisan/anaconda3/envs/obspy/lib/python3.10/site-packages/obspy/core/”, line 1898, in select
[net, sta, loc, chan] = id.upper().split(‘.’)
ValueError: not enough values to unpack (expected 4, got 3)

I’d welcome any ideas why this is happening or what I could check. My Linux is slightly better than my Python, but I think I’m out of my depth.

I would recommend post mortem debugging. Your program fails because it runs into what should be a SEED ID but there are only 2 dots in the ID, which is unexpected. Debug it after it fails and you can check what that faulty ID is and go up in the execution stack and look where it is coming from.

python -m pdb

Then hit c (for “continue”) once to start the program. See e.g. below for details into debugging.

Many thanks. I’ll try this out.

Many, many thanks for telling me about the debugger. I had gone all old-school and was inserting print statements throughout my scripts to try and find bugs.