Hi both,
Thanks for your replies.
I have done some testing and it seems that having __ in the file does have an impact, although it does not have to be in the file name itself (see first image). Having it in the code also seems to make the MB buggy. I have not been able to isolate the exact issue, but it seems that even having __ in the code and then removing it has an impact (see second image after __ removal MB is still buggy). I have also created another test file for which the MB kind of works but does not quite display properly (see third image)
I am running v3.11.9 as it is listed as the latest “stable” version here Python Releases for Windows | Python.org
Please see below the error messages I get from images 1 and 2 (I get the same error even after removing the “__”). For image 3 I do not get an error even though the display is not quite right.
Thank you for your help.
Exception in Tkinter callback
Traceback (most recent call last):
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\tkinter_init_.py”, line 1967, in call
return self.func(*args)
^^^^^^^^^^^^^^^^
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\idlelib\multicall.py”, line 176, in handler
r = li
^^^^^^^^^^^
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\idlelib\editor.py”, line 782, in open_module_browser
browser.ModuleBrowser(self.root, filename)
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\idlelib\browser.py”, line 96, in init
self.init()
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\idlelib\browser.py”, line 132, in init
node.expand()
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\idlelib\tree.py”, line 156, in expand
self.update()
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\idlelib\tree.py”, line 195, in update
self.draw(7, 2)
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\idlelib\tree.py”, line 210, in draw
sublist = self.item._GetSubList()
^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\idlelib\tree.py”, line 368, in _GetSubList
sublist = self.GetSubList()
^^^^^^^^^^^^^^^^^
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\idlelib\browser.py”, line 169, in GetSubList
return [ChildBrowserTreeItem(obj) for obj in self.listchildren()]
^^^^^^^^^^^^^^^^^^^
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\idlelib\browser.py”, line 190, in listchildren
tree = pyclbr.readmodule_ex(name, [dir] + sys.path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\pyclbr.py”, line 119, in readmodule_ex
return _readmodule(module, path or )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\pyclbr.py”, line 183, in _readmodule
return _create_tree(fullmodule, path, fname, source, tree, inpackage)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\pyclbr.py”, line 271, in _create_tree
mbrowser.visit(ast.parse(source))
^^^^^^^^^^^^^^^^^
File “C:\Users\pierr\AppData\Local\Programs\Python\Python311\Lib\ast.py”, line 50, in parse
return compile(source, filename, mode, flags,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 4
def def():
^^^
SyntaxError: invalid syntax