Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Invalid name for python module

crys
2011-04-11
2013-03-15
  • crys
    crys
    2011-04-11

    Hey,
    since the last pydev's update I get the following warning for each and every single python file (.py extension) within my projects:

    Inavlid name for Python module: some_name (it'll not be analyzed).

    It might be that there are naming conventions with regard to python modules, however, if people don't care about those it would be great if one can turn those warnings off. Is there such an option? I browsed through the properties of pydev within eclipse however didn't find a switch to turn them off.

    Any help would be greatly appreciated.
    Chris

     
  • Fabio Zadrozny
    Fabio Zadrozny
    2011-04-11

    Actually, that's not a warning, it's an error (and can't be turned off, since it's not a coding standard warning, but an actual python syntax limitation).

    Can you provide a screenshot with your case? (if your module-names are valid, it may be that it's a PyDev bug - since as it says, if it considers your module invalid, several features won't be properly available - such as the code analysis).

    Cheers,

    Fabio

     
  • crys
    crys
    2011-04-13

    Thanks Fabio for your comment. As far as I can see it's indeed a warning, a screenshot could be found here:
    http://www.rostlab.org/~schaefer/tmp/pydev_warn.png

    The thing that worries me is that this happens only since the last pydev's update. Before that, it was fine to use whatever filename.

    Chris

     
  • Fabio Zadrozny
    Fabio Zadrozny
    2011-04-13

    Well, the name is not really a valid module (module names cannot have a '-' in it, as if you had a module called my-module, you can't import it - i.e.: import my-module is not valid syntactically).

    The difference is that in the last release PyDev lets you know about it, while previously it wouldn't analyze your module but wouldn't say anything about it.

    So, PyDev is doing the proper thing (and your module should be renamed - you probably want to remove the '-' and use '_' instead).

    Cheers,

    Fabio