leinardi / pylint-pycharm

A plugin providing both real-time and on-demand scanning of Python files with PyLint from within PyCharm/IDEA.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PluginException: Icon cannot be found in '/modules/modulesNode.png'

erezmarmor opened this issue · comments

pylint-pycharm version:
0.12.1

description:
pycharm issues this error on each plugin execution.
this is mostly an aesthetic bug since it doesn't seem to prevent the plugin from running.

full traceback:

com.intellij.diagnostic.PluginException: Icon cannot be found in '/modules/modulesNode.png', action 'class com.leinardi.pycharm.pylint.actions.ScanModule' [Plugin: com.leinardi.pycharm.pylint]
	at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.reportActionError(ActionManagerImpl.java:394)
	at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.reportActionError(ActionManagerImpl.java:389)
	at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.access$000(ActionManagerImpl.java:75)
	at com.intellij.openapi.actionSystem.impl.ActionManagerImpl$1.compute(ActionManagerImpl.java:289)
	at com.intellij.openapi.util.IconLoader$LazyIcon.getOrComputeIcon(IconLoader.java:1097)
	at com.intellij.openapi.util.IconLoader$LazyIcon.paintIcon(IconLoader.java:1073)
	at com.intellij.openapi.actionSystem.ex.ActionButtonLook.paintIcon(ActionButtonLook.java:147)
	at com.intellij.openapi.actionSystem.ex.ActionButtonLook.paintIcon(ActionButtonLook.java:143)
	at com.intellij.openapi.actionSystem.impl.ActionButton.paintButtonLook(ActionButton.java:404)
	at com.intellij.openapi.actionSystem.impl.ActionButton.paintComponent(ActionButton.java:370)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1077)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086)
	at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086)
	at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086)
	at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5263)
	at java.desktop/javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:246)
	at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1333)
	at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5211)
	at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5021)
	at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:868)
	at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:851)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:851)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:826)
	at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:775)
	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1901)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:974)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:847)
	at com.intellij.ide.IdeEventQueue.lambda$null$8(IdeEventQueue.java:449)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:739)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

pycharm version:

PyCharm 2020.1 (Community Edition)
Build #PC-201.6668.115, built on April 7, 2020
Runtime version: 11.0.6+8-b765.25 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 5.3.0-46-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 1908M
Cores: 8
Non-Bundled Plugins: com.intellij.plugins.visualstudiokeymap, com.jetbrains.plugins.ini4idea, BashSupport, com.leinardi.pycharm.pylint
Current Desktop: ubuntu:GNOME

I'm experiencing the same issue with Intellij Community, it looks like this was due to the icon being retired: https://upsource.jetbrains.com/idea-ce/revision/idea-ce-7d10769f95e9022d10188ca27e6a42d5072e2745

I believe updating the icon for PylintModuleFilesAction to be "nodes/moduleGroup.svg" will resolve the issue. I don't know the backwards compatibility issues that may be caused by this switch however.
https://upsource.jetbrains.com/idea-ce/file/idea-ce-95b78420c8fa500cbdc4954e952cfedacf71252a/platform/icons/src/nodes/moduleGroup.svg?preview=false

I'm not very familiar with writing plugins for intellij products but I hope this information will help with a quicker resolution.

            <action id="PylintModuleFilesAction"
                    class="com.leinardi.pycharm.pylint.actions.ScanModule"
                    text="Check Module"
                    description="Run Pylint on all files in the current module"
                    icon="/nodes/moduleGroup.png">
            </action>

@bewczardski in which file should I change it? I changed icon value in user_folder\.PyCharmCE2019.3\config\plugins\pylint-plugin\lib\pylint-pycharm-0.12.1.jar on Windows 10 but I still get the same error, PyCharm can't find /modules/modulesNode.png.

Thanks for reporting this issue. I'll try to fix it during the coming weekend.

@leinardi I'm sorry I forgot that information, was trying to get this updated quickly last night.
When I searched the repo the hit I found for the icon was in src/main/resources/META-INF/plugin.xml line 152

icon="/modules/modulesNode.png">

Also I'm using IntelliJ IDEA Community 2020.1 (Build #IC-201.6668.121)

I released a new version with the fix for this issue: https://github.com/leinardi/pylint-pycharm/releases/tag/0.12.2
It will take some days until it's published on Jetbrains' repo, could someone install it manually and give me confirmation for this fix?

@leinardi I tested it this morning with Intellij IDEA 2020.1 (I own a license for IDEA but use the Community at work because they won't pay for licenses) and the icon changes look good. No error upon launch of the IDE.
image
image

Nice! Thanks for testing it 👍