Today I was puzzled that PyMcaMain.exe refused to start up on our Windows XP as well as on our Windows 7 machines, while all other programs of the PyMca suite work just fine.
I was able to find the reason why PyMcaMain.exe did not start.
It was a redirected "My Documents" folder.
We redirect this user folder to a different location (another partition or a server) in order to avoid data loss.
Starting PyMcaMain.exe with a redirected "My Documents" folder on Windows 7 32bit Enterprise leads to the following output:
C:\Program Files\PyMca 4.6.0>PyMcaMain.exe
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
File "build\PyMca\PyMcaMain.py", line 1935, in <module>
File "build\PyMca\PyMcaMain.py", line 386, in __init__
File "build\PyMca\PyMcaMain.py", line 1620, in __getDefaultSettingsFile
WindowsError: [Error 3] The system cannot find the path specified: 'C:\\Users\\test\\My Documents\\PyMca'
On Windows XP Professional it is something along the line of
"a required file could not be found, try reinstalling the application or get in touch with the administrator"
Here is how you can redirect the "My Documents" folder on Windows 7 Enterprise 32bit:
-use the windows explorer to navigate to %userprofile%
-right mouse button click on "My Documents" folder -- Properties -- Location: [Move...]
select a different location, for example create the folder d:\test and use it
clicking [OK] creates a security request:
Move Folder
--
Do you want to move all of the files from the old location to the new location?
Old location: c:\users\bla\Documents
New location: d:\test
We recommend moving all of the files so that programs needing to access the folder's content can do so.
[Yes] [No] [Cancel]
click on [Yes]
I have tried logging off the user as well as rebooting the machine.
Nothing helps, the above mentioned error persists.
Is there some sort of environment variable or a switch to PyMcaMain.exe or a configuration file that allows me to specify a different path for the configuration file of PyMca?
Thanks a lot in advance for your help.
Kind regards,
René
Thanks for the report.
While I study the issue, have you tried to start PyMca with the -f flag? That should bypass the settings file.
From the prompt: PyMcaMain.exe -f
From the menu: PyMCa Fresh Start
C:\Program Files\PyMca 4.6.0>PyMcaMain.exe -f
as well as the start menu entry give the same error as noted above
That makes two bugs in one. The fresh flag should have prevented that.
I have just committed a piece of code that should take care of the issue. I will try to generate a test binary file during the weekend for you to test it.
Please give a try to:
http://ftp.esrf.eu/pub/bliss/pymca4.6.1rc1-win64.exe
or (if you under windows 32 bit):
http://ftp.esrf.eu/pub/bliss/pymca4.6.1rc1-win32.exe
and keep me informed about the results (it should work)
Best regards,
Armando
thanks a lot for the fix!
I tested the 4.6.1-rc1-win32.exe on windows 7 32bit enterprise edition and it worked like a charme where the 4.6.0 version failed
Both `PyMcaMain.exe` and `PyMcaMain.exe -f` started with and without a redirected "My Documents" folder. All other pymca programs in the start menu started as well.
In the terminal window of pymcamain.exe (with and without -f switch) the following was written right after the start. Not sure if it is a problem, though.
--8<--
Please update your plugins
Use from PyMca import Plugin1DBase
--8<--
I will test rc1 on monday on a WinXP Prof. 32bit machine. Maybe I can find a 64 bit Win7 machine as well.
Great!
For the 64-bit machine do not worry. I have successfully tested it on a 64-bit Windows 7 Professional.
It would be great to test on a machine where the operating system is not in English. If you do not have one around, I will try to ask the mailing list for volunteers...
The written message is harmless. Nevertheless I will make sure it does not appear in next official release.
On a 32bit Windows XP Professional as well as on 32bit Windows 7 Enterprise I switched the display language from english to german and performed a restart of the computer.
Before and after the switch PyMca 4.6.1 rc1 32bit worked fine. Both with and without the -f switch.
Thanks a lot for the feedback. The completeness of your reports have made the fix quite straight forward.
Best regards,
Armando
PyMca 4.6.1 released (includes the correction).