Why does my mini program work but my main program does not?

Do you assign anything to the platform name anywhere? Do you modify frames, globals, locals or builtins anywhere? Do you fiddle with sys.modules anywhere? Any of these could explain the error.