Hello, I've read some related emails about this topic and also found this helpful website that I'd like to share here: https://www.rudiswiki.de/wiki9/SigrokDecoder
I went through some steps like getting the winpdb reborn up and running. While still not able to debug and looking for clues I stumbled upon the web link above and this maillist. So far I use only pulseview, not the CLI tool. For errors I check the settings (button) -> logging window. So I am facing the issue that I can't debug my protocol analyser in windows 10 OS because I can't get the rpdb2.py imported in my protocol analyser script. I tried several things: 1 - just add it to my script: Import rpdb2 * Error ImportError: No module named 'rpdb2' * SyntaxError: Failed to load decoder signature: import by name failed: invalid syntax (pd.py, line 138) 2 - try to expand python path so the python interpreter can find rpdb2.py: Import sys Import os sys.path.append(os.path.realpath(__file__)) * Error ImportError: No module named 'rpdb2' * SyntaxError: Failed to load decoder signature: import by name failed: invalid syntax (pd.py, line 138) 3 - Interestingly when I add this: from .rpdb2 import CConsole * ImportError: No module named 'rpdb' * SyntaxError: Failed to load decoder signature: import by name failed: invalid syntax (pd.py, line 138) Mind the rpdb without the '2', rpdb is a dependency for rpdb2.py so it seems now it can find and interpret rpdb2.py.. 4 - Try add rpdb2 with reference to current folder: import .rpdb2 * srd: import .rpdb2 * srd: ^ * SyntaxError: invalid syntax * SyntaxError: Failed to load decoder signature: import by name failed: invalid syntax (pd.py, line 138) 5 - Try this: https://stackoverflow.com/questions/67631/how-to-import-a-module-given-the-full-path import os import importlib.util spec = importlib.util.spec_from_file_location('rpdb2', os.path.realpath(__file__)) rpdb2 = importlib.util.module_from_spec(spec) spec.loader.exec_module(rpdb2) * srd: rpdb2 = importlib.util.module_from_spec(spec) * AttributeError: 'module' object has no attribute 'module_from_spec' * SyntaxError: Failed to load decoder signature: import by name failed: invalid syntax (pd.py, line 138) Does anybody have a suggestion how to solve this issue? Can someone add rpdb2.py (and dependencies) to the windows distribution of pulseview, I guess we want people to create additional protocol analysers and debugging capabilities really help people. I has been a big struggle and a time consumer util now without any result which is quite frustrating. BTW. On the wiki is mentioned to use print() for some hash debugging. When I add print statements I see no output whatsoever appearing (as mentioned before I use pulseview). Any tips here? I try to write my protocol analyser in the 'dark'... Thanks in advance
_______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel