From zengzr at ihep.ac.cn Tue Nov 1 03:21:53 2022 From: zengzr at ihep.ac.cn (=?UTF-8?B?5pu+5pm66JOJ?=) Date: Tue, 1 Nov 2022 10:21:53 +0800 (GMT+08:00) Subject: [mcstas-users] help!--AttributeError: module 'pyqtgraph.Qt.QtGui' has no attribute 'QApplication' Message-ID: <7243faef.d31d.18430fec472.Coremail.zengzr@ihep.ac.cn> Hi, I'm using McStas to simulate the instrument. I uninstalled my old version of McStas and installed the version 2.7.1. But there is a problem with the 'plot' function. I can't use it. Error prompt always pops up when compiling. The error is as following: 'mcplot-pyqtgraph C:\mcstas-2.7.1\source_test\13b20220704_20221031_165658 loading system configuration mcplot error: module 'pyqtgraph.Qt.QtGui' has no attribute 'QApplication' Traceback (most recent call last): File "C:\\mcstas-2.7.1\\lib\\tools\\Python\\mcplot\\pyqtgraph\\mcplot.py", line 67, in main(args) File "C:\\mcstas-2.7.1\\lib\\tools\\Python\\mcplot\\pyqtgraph\\mcplot.py", line 57, in main raise e File "C:\\mcstas-2.7.1\\lib\\tools\\Python\\mcplot\\pyqtgraph\\mcplot.py", line 49, in main plotter = pqtgfrontend.McPyqtgraphPlotter(graph, sourcedir=loader.directory, plot_func=plotfuncs.plot, invcanvas=args.invcanvas) File "C:\mcstas-2.7.1\lib\tools\Python\mcplot\pyqtgraph\..\..\mccodelib\pqtgfrontend.py", line 46, in __init__ self.app = QtGui.QApplication(sys.argv) AttributeError: module 'pyqtgraph.Qt.QtGui' has no attribute 'QApplication'' Can you give me some advice on how to solve this problem? Best regards, Lisa -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Tue Nov 1 07:40:34 2022 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Tue, 1 Nov 2022 06:40:34 +0000 Subject: [mcstas-users] help!--AttributeError: module 'pyqtgraph.Qt.QtGui' has no attribute 'QApplication' In-Reply-To: <7243faef.d31d.18430fec472.Coremail.zengzr@ihep.ac.cn> References: <7243faef.d31d.18430fec472.Coremail.zengzr@ihep.ac.cn> Message-ID: <869236EF-7261-4427-ADAF-64497527A002@fysik.dtu.dk> Hello Lisa, This is actually a well-known problem with the recent Python 3.10 release and the 2.7.1/3.1 releases, communicated to the mcstas-users mailinglist (https://mailman2.mcstas.org/pipermail/mcstas-users/2022q3/001478.html) website (https://www.mcstas.org) on September 23rd. To correct both this mcplot-related problem and a similar mcgui-related problem, please replace the following files within your installation folder: $MCSTAS/tools/Python/mcgui/viewclasses.py - please replace by this new version: https://raw.githubusercontent.com/McStasMcXtrace/McCode/mccode-3/tools/Python/mcgui/viewclasses.py $MCSTAS/tools/Python/mccodelib/pqtgfrontend.py - please replace by this new version https://raw.githubusercontent.com/McStasMcXtrace/McCode/mccode-3/tools/Python/mccodelib/pqtgfrontend.py New stable releases of McStas should be released during November/December this year. Best and sorry for the inconvenience, Peter Willendrup On 1 Nov 2022, at 03.21, ??? > wrote: Hi, I'm using McStas to simulate the instrument. I uninstalled my old version of McStas and installed the version 2.7.1. But there is a problem with the 'plot' function. I can't use it. Error prompt always pops up when compiling. The error is as following: 'mcplot-pyqtgraph C:\mcstas-2.7.1\source_test\13b20220704_20221031_165658 loading system configuration mcplot error: module 'pyqtgraph.Qt.QtGui' has no attribute 'QApplication' Traceback (most recent call last): File "C:\\mcstas-2.7.1\\lib\\tools\\Python\\mcplot\\pyqtgraph\\mcplot.py", line 67, in main(args) File "C:\\mcstas-2.7.1\\lib\\tools\\Python\\mcplot\\pyqtgraph\\mcplot.py", line 57, in main raise e File "C:\\mcstas-2.7.1\\lib\\tools\\Python\\mcplot\\pyqtgraph\\mcplot.py", line 49, in main plotter = pqtgfrontend.McPyqtgraphPlotter(graph, sourcedir=loader.directory, plot_func=plotfuncs.plot, invcanvas=args.invcanvas) File "C:\mcstas-2.7.1\lib\tools\Python\mcplot\pyqtgraph\..\..\mccodelib\pqtgfrontend.py", line 46, in __init__ self.app = QtGui.QApplication(sys.argv) AttributeError: module 'pyqtgraph.Qt.QtGui' has no attribute 'QApplication'' Can you give me some advice on how to solve this problem? Best regards, Lisa _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Tue Nov 1 13:51:52 2022 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Tue, 1 Nov 2022 12:51:52 +0000 Subject: [mcstas-users] A couple of new bugs - with workarounds/fixes Message-ID: Dear all, Firstly, several users have reported a bug related to our pyqtgraph plotter, that ends up crashing with e.g. File "C:\mcstas-2.7.1\lib\tools\Python\mcplot\pyqtgraph\plotfuncs.py", line 203, in plot_Data2D img.scale(dx,dy) TypeError: scale(self): too many arguments' If you are in this situation, replace your plotfuncs.py with this new version: https://raw.githubusercontent.com/McStasMcXtrace/McCode/master/tools/Python/mcplot/pyqtgraph/plotfuncs.py Secondly, if are on a Mac and upgrade to macOS 13 Ventura (intel/x86_64), your already installed Python tools of McStas/McXtrace and /Application bundles may not work after the upgrade. A workaround is to: * In a terminal, start your ?McStas or McXtrace shell" (e.g. run mcstas-3.1-environment, /Applications/McXtrace-1.7-environment.command or /Applications/McXtrace-3.0.app/Contents/Resources/mcxtrace/3.0/environment) * Issue the command export PATH=$MCSTAS/miniconda3/bin:$PATH * Next, you may issue the your gui command with either * * mcgui or mxgui New releases of McStas and McXtrace are in preparation and should be released during November or December. Best and sorry for the inconvenience, Peter Willendrup Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics [cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk] Technical University of Denmark [cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: From wagnerrichard at ill.fr Mon Nov 14 15:09:21 2022 From: wagnerrichard at ill.fr (Richard Wagner) Date: Mon, 14 Nov 2022 15:09:21 +0100 Subject: [mcstas-users] McStas 2.7.1 Installation on Ubuntu/Linux Message-ID: <5c2ac5e2-73c8-678d-fbad-65abb3129c68@ill.fr> Hi all (and especially Peter), I have a short question/remark concerning the installation of McStas 2.7. 1 on Ubuntu (22.04 in my case) Following the instructions on: https://github.com/McStasMcXtrace/McCode/blob/master/INSTALL-McStas-2.x/Linux/debian/README.md The two commands sudo apt-get install mcstas-suite-python sudo apt-get install mcstas-suite-python-ng both install McStas 3.1. To get the 2.7.1 install one can use the command: sudo apt-get install mcstas-suite-python=2.7.1 The downside: during a regular SW-update McStas thinks it is out-dated and installs the (the most current) 3.1. version and the 2.7.1 becomes broken. To fix it McStas (3.1.) has to be un-installed and 2.7.1 re-installed (with the command as above). Can this be fixed somehow from your side : i.e. the repository maintainers? Thanks in advance, Best, Richard -- *Richard Wagner* Postdoctoral Research Engineer Nuclear and Particle Physics Group Institut Laue-Langevin - ILL 71, avenue des Martyrs CS 20156 38042 Grenoble Cedex 9 France www.ill.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Mon Nov 14 15:16:25 2022 From: pkwi at fysik.dtu.dk (=?iso-8859-1?Q?Peter_Kj=E6r_Willendrup?=) Date: Mon, 14 Nov 2022 14:16:25 +0000 Subject: [mcstas-users] McStas 2.7.1 Installation on Ubuntu/Linux In-Reply-To: <5c2ac5e2-73c8-678d-fbad-65abb3129c68@ill.fr> References: <5c2ac5e2-73c8-678d-fbad-65abb3129c68@ill.fr> Message-ID: <8C6EF5B9-4FE9-4A7B-8F14-68092BEB69B1@fysik.dtu.dk> Hi Richard, Thanks for reporting, ouch! Yes I should be able to do something about that. Best, Peter On 14 Nov 2022, at 15.09, Richard Wagner wrote: Hi all (and especially Peter), I have a short question/remark concerning the installation of McStas 2.7. 1 on Ubuntu (22.04 in my case) Following the instructions on: https://github.com/McStasMcXtrace/McCode/blob/master/INSTALL-McStas-2.x/Linux/debian/README.md The two commands sudo apt-get install mcstas-suite-python sudo apt-get install mcstas-suite-python-ng both install McStas 3.1. To get the 2.7.1 install one can use the command: sudo apt-get install mcstas-suite-python=2.7.1 The downside: during a regular SW-update McStas thinks it is out-dated and installs the (the most current) 3.1. version and the 2.7.1 becomes broken. To fix it McStas (3.1.) has to be un-installed and 2.7.1 re-installed (with the command as above). Can this be fixed somehow from your side : i.e. the repository maintainers? Thanks in advance, Best, Richard -- Richard Wagner Postdoctoral Research Engineer Nuclear and Particle Physics Group Institut Laue-Langevin - ILL 71, avenue des Martyrs CS 20156 38042 Grenoble Cedex 9 France www.ill.eu _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Mon Dec 12 18:46:13 2022 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Mon, 12 Dec 2022 17:46:13 +0000 Subject: [mcstas-users] McStas releases 2.7.2 and 3.2 are out! Message-ID: <5FDE112F-AB82-4475-8D9D-566825D89AFE@fysik.dtu.dk> Dear all, a new PAIR of releases of McStas: * McStas "classic" v. 2.7.2 * McStas "next-generation", v. 3.2 Are both built and ready for download! Download and installation instructions are available via our GitHub INSTALL-doc pages. The frontpage of mcstas.org has a list of highlight-features, and the full list of changes for both releases is further available at https://mcstas.org/CHANGES_McStas. Please start your migration to 3.x: * McStas 2.7.2 is a "last update" to the 2.x series, sharing a subset of tool features with McStas 3.2. * The The Wiki has a dedicated section on McStas 2.x -> McStas 3.x conversion that includes: * An overvies of differences * A nomenclature list containing short descriptions of new concepts and important keywords in McStas 3.x and OpenACC / CUDA code in general. * A document outlining the most importand differences between 2.x and 3.x. * A guide for 2.x -> 3.x instrument conversion. * A guide for 2.x -> 3.x component conversion. - If you are in trouble migrating, please write us a GitHub issue or an email to mcstas-users at mcstas.org We hope you will enjoy these new releases!!! Seasons greetings on behalf of the McStas team, Peter Willendrup Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics [image001.gif] Technical University of Denmark [image002.gif] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: From pkwi at fysik.dtu.dk Tue Dec 20 09:57:58 2022 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Tue, 20 Dec 2022 08:57:58 +0000 Subject: [mcstas-users] McStas releases 2.7.2 and 3.2 are out! In-Reply-To: <5FDE112F-AB82-4475-8D9D-566825D89AFE@fysik.dtu.dk> References: <5FDE112F-AB82-4475-8D9D-566825D89AFE@fysik.dtu.dk> Message-ID: <396578BE-A7A1-4A20-8C5B-EAC9A17994C2@fysik.dtu.dk> Hello again, * For 2.7.2 users on arm64 macOS - if you downloaded before today: Last night I found a small mishap in the macOS Silicon / arm64 release of McStas 2.7.2: - It actually contained a set of 3.x binaries and tools. A fresh build of 2.7.2 for arm64 macOS was immediately uploaded. * For Ubuntu users where your browser can not access the documentation: Please consult https://github.com/McStasMcXtrace/McCode/issues/1378 for a solution * Further, for those of you on CentOS I have decided to released a set of packages: https://download.mcstas.org/mcstas-3.2/Linux/centos/ https://download.mcstas.org/mcstas-2.7.2/Linux/centos/ These are the last packages released for CentOS and are not offered from the repo - they must be manually installed. Best, Peter Willendrup On 12 Dec 2022, at 18.46, Peter Kj?r Willendrup wrote: Dear all, a new PAIR of releases of McStas: * McStas "classic" v. 2.7.2 * McStas "next-generation", v. 3.2 Are both built and ready for download! Download and installation instructions are available via our GitHub INSTALL-doc pages. The frontpage of mcstas.org has a list of highlight-features, and the full list of changes for both releases is further available at https://mcstas.org/CHANGES_McStas. Please start your migration to 3.x: * McStas 2.7.2 is a "last update" to the 2.x series, sharing a subset of tool features with McStas 3.2. * The The Wiki has a dedicated section on McStas 2.x -> McStas 3.x conversion that includes: * An overvies of differences * A nomenclature list containing short descriptions of new concepts and important keywords in McStas 3.x and OpenACC / CUDA code in general. * A document outlining the most importand differences between 2.x and 3.x. * A guide for 2.x -> 3.x instrument conversion. * A guide for 2.x -> 3.x component conversion. - If you are in trouble migrating, please write us a GitHub issue or an email to mcstas-users at mcstas.org We hope you will enjoy these new releases!!! Seasons greetings on behalf of the McStas team, Peter Willendrup Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics [image001.gif] Technical University of Denmark [image002.gif] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: