McStasMcXtrace / McCode

The home of the McStas (neutrons) and McXtrace (x-rays) Monte-Carlo ray-tracing instrument simulation codes.
https://github.com/McStasMcXtrace/McCode/wiki
GNU General Public License v3.0
77 stars 54 forks source link

Issue with built-in QScintilla editor on Ubuntu 24.04 (PyQt6 related) #1721

Open willend opened 1 week ago

willend commented 1 week ago

On Ubuntu 24.04.1, the m[c/x]gui built-in editor fails due to missing scintilla dependencies and missing Qt6-transition code.

At e.g. File->New one yields

mcgui 
loading system configuration
Traceback (most recent call last):
  File "/usr/share/mcstas/tools/Python/mcgui/mcgui.py", line 896, in handleNewInstrument
    self.view.showCodeEditorWindow(new_instr)
  File "/usr/share/mcstas/tools/Python/mcgui/viewclasses.py", line 63, in showCodeEditorWindow
    self.ew.initCodeEditor(instr)
  File "/usr/share/mcstas/tools/Python/mcgui/viewclasses.py", line 427, in initCodeEditor
    self.__scintilla.setText(open(instr, encoding='utf-8', errors='ignore').read())
    ^^^^^^^^^^^^^^^^
AttributeError: 'McCodeEditorWindow' object has no attribute '_McCodeEditorWindow__scintilla'. Did you mean: '_McCodeEditorWindow__initScintilla'?

Best workaround for now:

If you prefer to use another editor than gedit, then please:

willend commented 1 week ago