mcgui in McStas 2.4 - configuration dialogue crashes #470

Closed
willend opened this Issue May 18, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@willend
Contributor

willend commented May 18, 2017

The error message is along the lines of:

/usr/share/mcstas/2.4/tools/Python/mcgui/../mccodelib/mccode_config.py:76: SyntaxWarning: name 'configuration' is used prior to global declaration
  global configuration
user config does not exist: /home/farhi/.mcstas/2.4/mccode_config.json
Traceback (most recent call last):
  File "/usr/share/mcstas/2.4/bin/../tools/Python/mcgui/mcgui.py", line 615, in handleConfiguration
    self.view.showConfigDialog()
  File "/usr/share/mcstas/2.4/tools/Python/mcgui/viewclasses.py", line 171, in showConfigDialog
    dlg = McConfigDialog()
  File "/usr/share/mcstas/2.4/tools/Python/mcgui/viewclasses.py", line 1007, in __init__
    prefix = mccode_config.get_mccode_prefix()
AttributeError: 'module' object has no attribute 'get_mccode_prefix'
@willend

This comment has been minimized.

Show comment
Hide comment
@willend

willend May 18, 2017

Contributor

The solution is to:

  • Deb/RPM Linux: install the package mcstas-tools-python-mccodelib-2.4 again using either
    • Linux deb: sudo apt-get install --reinstall mcstas-tools-python-mccodelib-2.4
    • Linux rpm: sudo yum reinstall mcstas-tools-python-mccodelib-2.4
  • macOS: Place ths configuration file (http://downloads.mcstas.org/mcstas-2.4/mac/mccode_config.py) in your /Applications//McStas-2.4.app/Contents/Resources/mcstas/2.4/tools/Python/mccodelib/ folder (hint: run 'open $MCSTAS' from the terminal and you should get a finder window in /Applications//McStas-2.4.app/Contents/Resources/mcstas/2.4/)
  • Windows: Place this configuration file (http://downloads.mcstas.org/mcstas-2.4/windows/mccode_config.py) in your C:\mcstas-2.4\lib\tools\Python\mccodelib folder (hint: run 'start %MCSTAS%' from the terminal and you should get an explorer window in C:\mcstas-2.4\lib)
Contributor

willend commented May 18, 2017

The solution is to:

  • Deb/RPM Linux: install the package mcstas-tools-python-mccodelib-2.4 again using either
    • Linux deb: sudo apt-get install --reinstall mcstas-tools-python-mccodelib-2.4
    • Linux rpm: sudo yum reinstall mcstas-tools-python-mccodelib-2.4
  • macOS: Place ths configuration file (http://downloads.mcstas.org/mcstas-2.4/mac/mccode_config.py) in your /Applications//McStas-2.4.app/Contents/Resources/mcstas/2.4/tools/Python/mccodelib/ folder (hint: run 'open $MCSTAS' from the terminal and you should get a finder window in /Applications//McStas-2.4.app/Contents/Resources/mcstas/2.4/)
  • Windows: Place this configuration file (http://downloads.mcstas.org/mcstas-2.4/windows/mccode_config.py) in your C:\mcstas-2.4\lib\tools\Python\mccodelib folder (hint: run 'start %MCSTAS%' from the terminal and you should get an explorer window in C:\mcstas-2.4\lib)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment