#564 'unresolved import', but still works

1.3.8
closed
5
2008-03-05
2007-09-05
Berco Beute
No

I have a folder (/home/user/otherproject/bin) with compiled java classes that I want to use from my jython script. I've added that folder to 'project properties/pythonpath/external source folders'. I can use the classes (e.g. '/home/user/otherproject/bin/com/company/test/Test.class'), even though the import shows the 'unresolved import' error.

=== Setup ===
ubuntu
eclipse 3.3
pydev 1.3.8
jython 2.2
java 5

Discussion

  • Adam Shimali

    Adam Shimali - 2008-02-19

    Logged In: YES
    user_id=1371366
    Originator: NO

    I have seen this problem as well. In addition I get problems with with "undefined variable from import" error. Both these errors are shown as expected in Eclipse, i.e. a red X by the left edge of editor pane and red underline of offending line of code.

    However the code runs and the error message is wrong as the variable is in fact present (you can prove this by using interpreter, import module call dir(classname) and you can see the variable plain as day listed in the output).

    Setup
    windows xp
    eclipse 3.3
    pydev 1.3.13
    pydev extentions 1.3.13
    java 5

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2008-02-19

    Logged In: YES
    user_id=617340
    Originator: NO

    Is that project a JDT project? If it is, you should be adding a reference to that project (version 1.3.12 onwards), as pydev now uses JDT to get code completion on java projects.

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2008-02-19
    • status: open --> pending
     
  • Adam Shimali

    Adam Shimali - 2008-02-19

    Logged In: YES
    user_id=1371366
    Originator: NO

    Sorry I should have mentioned that. The project was created as a Python 2.5 project.

    I'm not sure I understand your solution though. How would I set the project to be a JDT project?

    More to the point if I created the project using the current version or the plugin, why does it not know that it should be a JDT project?

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2008-02-19

    Logged In: YES
    user_id=617340
    Originator: NO

    Are you using jython or python? (the bug originally reported is related to jython)

     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks