Page 1 of 1

Cannot use Project Manager, SystemError on start

Posted: 20.10.2023 20:41
by aaronzheng1994
I am using Cudatext 1.200.0.0 on Pop OS 22.04 LTS, installed with Flatpak. I am seeing the following issues which seem to be related:
  • When I click the Project icon in the Sidebar, the Project panel shows up blank, regardless of whether I have any files open in Cudatext
  • When I use the Command Palette (Ctrl + Shift + P) and select Project Manager: New Project, Open Folder, and select a folder, nothing happens. Project panel continues to be blank
On startup, and whenever I try to use Project Manager, I see the following output in the Cudatext console:

Code: Select all

TypeError: 'str' object cannot be interpreted as an integer

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/me/.var/app/io.github.cudatext.CudaText-Qt5/config/cudatext/py/cuda_project_man/__init__.py", line 972, in menu_recents
    self.init_panel()
  File "/home/me/.var/app/io.github.cudatext.CudaText-Qt5/config/cudatext/py/cuda_project_man/__init__.py", line 301, in init_panel
    self.init_form_main()
  File "/home/me/.var/app/io.github.cudatext.CudaText-Qt5/config/cudatext/py/cuda_project_man/__init__.py", line 246, in init_form_main
    self.toolbar_imglist = toolbar_proc(self.h_bar, TOOLBAR_GET_IMAGELIST)
  File "/home/me/.var/app/io.github.cudatext.CudaText-Qt5/config/cudatext/py/cudatext.py", line 1161, in toolbar_proc
    return ct.toolbar_proc(str(id_toolbar), id_action, text, text2, str(command), index, index2)
SystemError: <built-in function toolbar_proc> returned a result with an exception set
ERROR: Exception in CudaText for menu_recents: SystemError: <built-in function toolbar_proc> returned a result with an exception set
My Plugins menu is working. Cudatext is able to find Python. However I cannot use the Project Manager. Is anyone else having these issues with the Flatpak version, can I hear how you fixed these issues?

Re: Cannot use Project Manager, SystemError on start

Posted: 21.10.2023 05:03
by main Alexey
del

Re: Cannot use Project Manager, SystemError on start

Posted: 21.10.2023 05:14
by main Alexey
found the reason.
you have this line in py/cudatext.py:

Code: Select all

    return ct.toolbar_proc(str(id_toolbar), id_action, text, text2, str(command), index, index2)
it is bad. leftover from old versions of Cud.
good line is

Code: Select all

    return ct.toolbar_proc(id_bar, id_action, text, text2, str(command), index, index2)
update files py/*.py from last Cud!
they are here:
https://github.com/Alexey-T/CudaText/tree/master/app/py

Re: Cannot use Project Manager, SystemError on start

Posted: 21.10.2023 05:24
by main Alexey
you have folder 'py' on PC here:
/home/me/.var/app/io.github.cudatext.CudaText-Qt5/config/cudatext/py