Hi Folks,
I’ve been utilizing this excellent script posted by @smohler from a prior thread for dynamic filepathing / worklist assigning (Thank you Sam!)
https://forums.pylabrobot.org/t/biomek-scripting-tools/75/4?u=sclarkson
I’ve been trying to accomplish something similar by firing off a python script (called by a .bat script) using the “run program” utility and capturing stdout as a global variable. That routine returns the filepath of the most recently modified .csv file in a static directory so I can cast that to a global variable and avoid needing to prompt the user to use the file selector to pick the file (in theory).
This is where things get weird: the global variable established in Sam’s script always works whereas the filepath fed by the python script always throws a “cannot open file in path…” error: As far as I can tell the strings that are generated by the two different methods are IDENTICAL.
User pause prompts with =filePath variables assigned in both manners in screenshots below:
I’ve checked for whitepsace things like trailing / leading spaces and newline / carriage return characters etc. and come up with nothing. I’ve even tried declaring a new global variable with the value captured by the python script step but that doesn’t help either.
Has anybody else run into something like this? I think I ran into the same problem ~6-7 years back on an FXp running Biomek 3.XX version software and never figured it out / have always just accepted a few more clicks on the user’s end to get around this behavior.