ok, I found the answer finally. I never really had an error. I did not find that out because I never tried to actually run the script because the editor indicated there was an error... The maker of PyDev answered the following question himself and provides a workaround:
How do I fix PyDev "Undefined variable from import" errors?
For code in your project, the only way is adding a comment saying that you expected that (the static code-analysis only sees what you see, not runtime info -- if you opened that module yourself, you'd have no indication that main was expected).
You can use ctrl+1 (Cmd+1 for Mac) in a line with an error and pydev will present you an option to add a comment to ignore that error.