After installing the trial version of pydev extensions I get a syntax error on
pickle.load and pickle.dump. The parser is confused - here's the content of the
Undefined variable from import: load
function: <function load at 0x00B94108>
It can't be both defined and undefined at the same time unless I've stepped into a
Schroedinger cat box :-)
The code executes without complaint.
That seems like a problem in the code-analysis (not really a syntax error). Can you give details on the python version you're using and the actual sample code that's failing? (It seems to work for me)
This was working perfectly on the "free" version of pydev and started exhibiting problems immediately after installing the pydev-extensions. When I installed pydev-extensions, Eclipse treated it as a separate package from the base pydev, so both show up as installed in the package list. Is that how it should be?
> both show up as installed in the package list. Is that how it should be?
Yes, that's how it should be.
That error is issued from the code-analysis... If you create an empty file and do:
pickle.|<-- request code-completion here
Do you have the load() method there?
The only thing showing up in code-completion is
I'll send you a screenshot if you wish.
I've also just discovered another problem. Given the following SSCCE:
if not os.path.exists("x.txt"): print("ok")
The first instance of "os" is flagged with:
Unused import: os
The second instance is flagged with:
Import redefinition: os
This is also new since installing pydev-extensions
Actually, if you do:
You can already use the 'os' token (no need to reimport it -- which is what you're actually doing, and that's why it complains).
I installed build 2721 and the problem persists.
Then I removed pydev-extensions and the error flags went away.
Curiously however, code-completion on "pickle.___" still lists only
Those errors are from the pydev extensions code-analysis (which uses the same type-inference engine from the open source version, so, it'll give an error on pickle.load if it's not available in the completions for pickle).
Please report that as a bug, specifying the python version you're using (you can also try adding 'pickle' to your forced builtins... that should not be needed in 2.6 and 3.0 -- which are the versions I tested here, but it could be that some other version has 'special needs').