Menu

#1009 Problem analysing matplotlib.cm

open
Editor (491)
5
2010-01-04
2009-11-11
No

in Eclipse I have in my code for example:

from matplotlib import cm

palette = cm.gray <-- then the editor says theres a error: Undefined variable from import: gray

which is a false report.

Alan

Discussion

  • Fabio Zadrozny

    Fabio Zadrozny - 2009-11-11

    Have you tried adding 'matplotlib' to the forced builtins? See: http://pydev.org/manual_101_interpreter.html

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2009-11-11
    • status: open --> pending
     
  • Alan Wilter S. da Silva

    I tried what suggested and I think things got worse. Now I have in Error Log:

    eclipse.buildId=M20090917-0800
    java.version=1.6.0_15
    java.vendor=Apple Inc.
    BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=en_GB
    Framework arguments: -product org.eclipse.epp.package.java.product -keyring /Users/alan/.eclipse_keyring -showlocation
    Command-line arguments: -os macosx -ws cocoa -arch x86 -product org.eclipse.epp.package.java.product -keyring /Users/alan/.eclipse_keyring -showlocation

    Error
    Thu Nov 12 12:11:22 GMT 2009
    ERROR WITH STRING:

    java.lang.RuntimeException: Couldn't find END@@ on received string.
    at org.python.pydev.editor.codecompletion.shell.AbstractShell.read(AbstractShell.java:641)
    at org.python.pydev.editor.codecompletion.shell.AbstractShell.read(AbstractShell.java:661)
    at org.python.pydev.editor.codecompletion.shell.AbstractShell.getCompletions(AbstractShell.java:891)
    at org.python.pydev.editor.codecompletion.shell.AbstractShell.getTheCompletions(AbstractShell.java:833)
    at org.python.pydev.editor.codecompletion.shell.AbstractShell.internalChangePythonPath(AbstractShell.java:823)
    at org.python.pydev.editor.codecompletion.shell.AbstractShell.getLineCol(AbstractShell.java:937)
    at org.python.pydev.editor.codecompletion.revisited.modules.CompiledModule.findDefinition(CompiledModule.java:353)
    at org.python.pydev.editor.codecompletion.revisited.modules.CompiledModule.findDefinition(CompiledModule.java:1)
    at org.python.pydev.editor.codecompletion.revisited.modules.SourceModule.findDefinition(SourceModule.java:748)
    at org.python.pydev.editor.codecompletion.revisited.modules.SourceModule.findDefinition(SourceModule.java:1)
    at org.python.pydev.editor.refactoring.PyRefactoringFindDefinition.findActualDefinition(PyRefactoringFindDefinition.java:164)
    at org.python.pydev.editor.refactoring.PyRefactoringFindDefinition.findActualDefinition(PyRefactoringFindDefinition.java:72)
    at com.python.pydev.refactoring.refactorer.RefactorerFindDefinition.findDefinition(RefactorerFindDefinition.java:50)
    at com.python.pydev.refactoring.refactorer.Refactorer.findDefinition(Refactorer.java:91)
    at com.python.pydev.refactoring.wizards.rename.PyRenameEntryPoint.checkInitialConditions(PyRenameEntryPoint.java:175)
    at com.python.pydev.refactoring.markoccurrences.MarkOccurrencesJob.checkAnnotations(MarkOccurrencesJob.java:219)
    at com.python.pydev.refactoring.markoccurrences.MarkOccurrencesJob.run(MarkOccurrencesJob.java:126)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

     
  • Alan Wilter S. da Silva

    • status: pending --> open
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2009-12-20
    • summary: reporting wrong error --> Problem analysing matplotlib.cm
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2009-12-20

    If you open a python shell and do:

    from matplotlib import cm
    print('gray' in dir(cm))

    Does it print true?

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2009-12-20
    • status: open --> pending
     
  • SourceForge Robot

    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
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-01-04
    • status: closed --> open
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.