I have got a multiple problem with file system usage on memory card.
I have created following utility function:
with open(current_work_directory + “Soccer/log/output.txt”, ‘a’) as f:
print(*text, file = f)
It helps all printing outputs redirect to file when OpenMV is detached from computer. Using this utility yields unpredictable result. In some cases I receive expected result, but in some cases print goes in wrong file with unpredictable location. Failure usially shows itself when one of .py files under execution appears spoiled.
It appears that part of source code is replaced by print messages. It seems that Micropython keeps several files open during execution of .py source code and then confuses with them when print instruction is arrived.
There is not reliable method to test what is a real reason because failure is not stable.
Sincerely Azer Babaev