It seems there are some problems running Drpython on Mac OSX...
When I launch drpython.pyw, python opens the drpython menubar and then crashes, restarting the shell.
I don't know if it is a font problem as reported in other messages.
And in that case, what should I do and where ?
Could anybody help ?
I successfully installed drpython on my pc and am really willing to use it as well on my office mac.
That's a nice software...
Thanks in advance
Dominique
PS 1:
My config is:
- Mac OS X 10.4.8 with PPC G5 1,8Ghz,
- Python 2.5
- wxpython 2.8.3.0 MAC Unicode py 2.5
PS2:
It seems the thread 0 crashed. Below is an excerpt of the crash report:
1/ No I have not asked the wxPython mailing list.
I went here first.
2/ The only message I receive when I launch "Terminal" is "Trace/BPT trap".
3/ It is really a very good software.
4/ Where should I search facename and SetFaceName ? In a drpython file ?
5/ I learnt python and wxpython alone (I am not a brand newbbie but not a good programmer either...) , so forgive the 4/ question ...
Thanks for your help
Dominique
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a Intel Mac with OS X 10.4.8, I have drPython running, but I will download the latest release from the cvs and install it to see if I get any trouble.
Make sure you start from a fresh system by deleting the preferences file, right now I do not remeber where is located, but if you search in this list for the post I have set you will find out this, otherwise wait until I get this done.
Heberto
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
is there any lineinfo/python file in the traceback.
In the sourcecode I found only 2 locations:
in drTreeDialog: w.SetFaceName(yarrr[0])
before it, could you try print yarrr?
an in drSourceBrowser:
print yarrr[0]
w.SetFaceName(yarrr[0])
maybe Antonio knows better, he answered the thread some weeks ago.
The wxPyhton Demo is running(?).
Do you have already a preferences.dat?
What is the value of:
<sourcebrowser.style>fore:#000000,back:#FFFFFF,size:8,face:Arial,bold</sourcebrowser.style>
(it is my entry on Windows)
in drPreferences.py, there are the default settings:
if defaultfont0 not in FontList:
defaultfont0=defaultfont
if defaultfont1 not in FontList:
defaultfont1=defaultfont
Could you print out/try another font?
Sorry for helping not much, I hope someone will answer in the wxPy mailing list.
Cheers,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The first thing I'd recommend you try is upgrading both your Python and wxPython releases. I don't have Python 2.5 myself, but I noticed it says "alpha" in the Python version number, so I suspect that was one of the initial Python 2.5 releases for Mac.
On wxPython 2.8.4.0 on Python 2.4, when I run DrPython I don't get any errors, but I do get a bunch of debug warnings because DrPython is trying to set the font to faces/configurations that don't exist on the OS X system I'm running it on. The offending font names seem to be "Courier 10 Pitch", "Sans" and "Sans Serif". Also, the latter two seem very odd to me as those aren't really face names, they're font families - specifically, the wxFONTFAMILY_ROMAN and wxFONTFAMILY_SWISS families.
Anyway, please let me know if it is still crashing for you with wxPython 2.8.4.0 and the latest Python 2.5. If so, I'll make a note of it on the wxPython lists and hopefully someone setup for 2.5 can take a look at it.
Thanks,
Kevin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"Sans" and "Sans Serif" are typical aliases that are used on Linux systems, and the user can have whatever are their favorite fonts aliased to these names. They are not real font face names, but this is a common trap that Linux programmers fall into. IMO the best thing to do for any wx app to do is to default only to font families and not hard code any face names at all if possible. Then let the user choose which fonts to use and save those face names in a config file. Even then it's still a good idea to verify the names saved in the config file with the wx.FontEnumerator.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Robin and Kevin, thank you very much for your recommendation and analysis, and also for taking your time, answering here directly! :)
Your suggestions are very helpful.
I (or any other DrPython fellow) will try to make a clean solution for that.
Cheers,
Franz
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I uninstalled wxpython 2.8.3.0 and installed the latest version ie 2.8.4.0.
Guess what happened...
It works fine.
That's great.
Thank you all for your help and your time spent for me.
May I advise the persons in charge of DrPython to put it clear (on the web site and / or in the ReadMe) that in case it doesn't work, the first thing to try is to re-install wxpython with the latest version.
Anyway, thank you so much.
It is really a great pleasure to have people trying to help (this apply of course also to wxPython users'list).
Thanks again
Dominique
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well I thought it worked...
Once drpython runs, when I try to run any application, the shell prints execvp failed with erro 2.
Below is the shell print:
"Applications/MacPython 2.5/IDLE.app/Contents/MacOS/Python -u "/Volumes/Macintosh HD/Users/ag/Desktop/COMPTAS/ ECV/nbtest.py"
execvp(/Applications/MacPython, 2.5/IDLE.app/Contents/MacOS/Python, -u, /Volumes/Macintosh HD/Users/ag/Desktop/COMPTAS/ ECV/nbtest.py) failed with error 2!"
Please note that it happens for applications that works as well as for tests (example: print "oops")
Any idea?
We are not far from the end I hope...
Thanks
Dominique
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK. Now it works fine.
I would suggest people in charge of drpython to put this procedure in the ReadMe and to stick it up in the help forum and the website... This will save hours to others to search for good infos and nice people to help...
Thank you all
1) Re-install both python and wxpython with the latest versions.
2) Download TinkerTool to enable access to hidden directories and files. Otherwise,
3) Throw away the former ".drpython" preferences directory (located for me in /Users/MyUserName/Library/Preferences)
4) Install and launch drpython. Close it
5) Go to drPreferences.py and change the "Courier 10 Pitch" and "Sans" fonts with a view to having something like:
if self.platform_is_windows:
defaultfont0="Courier"
defaultfont1="MS Sans Serif"
else:
defaultfont0="Comic Sans MS"#"Courier 10 Pitch"
defaultfont1="Comic Sans MS"#"Sans"
6) Go to preferences.dat in the "/Users/MyUserName/Library/Preferences/.drpython" directory.
There, search for "Sans" and "Sans Serif" and possibly ""Courier 10 Pitch" and replace them with a mac known font (ex: Comic Sans MS). Save.
You can work...
Again thanks to all for your time and your help...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I forgot something.
To launch drpython directly, without having to go through IDLE, right click on the drpython.pyw file, choose open with Python Launcher (make sure to choose the right python launcher if you have several installs).
Bye
Dominique
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
It seems there are some problems running Drpython on Mac OSX...
When I launch drpython.pyw, python opens the drpython menubar and then crashes, restarting the shell.
I don't know if it is a font problem as reported in other messages.
And in that case, what should I do and where ?
Could anybody help ?
I successfully installed drpython on my pc and am really willing to use it as well on my office mac.
That's a nice software...
Thanks in advance
Dominique
PS 1:
My config is:
- Mac OS X 10.4.8 with PPC G5 1,8Ghz,
- Python 2.5
- wxpython 2.8.3.0 MAC Unicode py 2.5
PS2:
It seems the thread 0 crashed. Below is an excerpt of the crash report:
Date/Time: 2007-05-21 09:52:38.530 +0200
OS Version: 10.4.8 (Build 8L127)
Report Version: 4
Command: Python
Path: /Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
Parent: Python [213]
Version: 2.5a0 (2.5alpha0)
PID: 242
Thread: 0
Exception: EXC_SOFTWARE (0x0005)
Code[0]: 0x00000001
Code[1]: 0x02738ab8
Thread 0 Crashed:
0 libwx_macud-2.8.0.dylib 0x02738ab8 wxFontRefData::MacFindFont() + 744 (icplusplus.c:28)
1 libwx_macud-2.8.0.dylib 0x02738e14 wxFont::RealizeResource() + 20 (icplusplus.c:28)
2 libwx_macud-2.8.0.dylib 0x0273a0f0 wxFont::SetFaceName(wxString const&) + 64 (icplusplus.c:28)
3 _gdi_.so 0x031c6e50 _wrap_Font_SetFaceName + 608 (_gdi_wrap.cpp:14931)
etc ..................
Hello DomDom,
I cannot say anything here. I have no mac. Maybe some other people. Did you try asking
in the wxPython-mailing list. Should I ask? Well, I do!
Do you have a python traceback when starting with "python drpython.py".
PS: Thank you for your opinion of nice software! :)
Can you display the facename, used in SetFaceName? Is it installed on your system?
Hello Franz,
1/ No I have not asked the wxPython mailing list.
I went here first.
2/ The only message I receive when I launch "Terminal" is "Trace/BPT trap".
3/ It is really a very good software.
4/ Where should I search facename and SetFaceName ? In a drpython file ?
5/ I learnt python and wxpython alone (I am not a brand newbbie but not a good programmer either...) , so forgive the 4/ question ...
Thanks for your help
Dominique
I have a Intel Mac with OS X 10.4.8, I have drPython running, but I will download the latest release from the cvs and install it to see if I get any trouble.
Make sure you start from a fresh system by deleting the preferences file, right now I do not remeber where is located, but if you search in this list for the post I have set you will find out this, otherwise wait until I get this done.
Heberto
Remove the directory .drpython located on ~/Library/Preferences
in my case this is /Users/heberto/Library/Preferences/.drpython
BTW I have according to the changelog.txt release 166 and i works properly
Heberto
Hello Dominique,
is there any lineinfo/python file in the traceback.
In the sourcecode I found only 2 locations:
in drTreeDialog: w.SetFaceName(yarrr[0])
before it, could you try print yarrr?
an in drSourceBrowser:
print yarrr[0]
w.SetFaceName(yarrr[0])
maybe Antonio knows better, he answered the thread some weeks ago.
The wxPyhton Demo is running(?).
Do you have already a preferences.dat?
What is the value of:
<sourcebrowser.style>fore:#000000,back:#FFFFFF,size:8,face:Arial,bold</sourcebrowser.style>
(it is my entry on Windows)
in drPreferences.py, there are the default settings:
if defaultfont0 not in FontList:
defaultfont0=defaultfont
if defaultfont1 not in FontList:
defaultfont1=defaultfont
Could you print out/try another font?
Sorry for helping not much, I hope someone will answer in the wxPy mailing list.
Cheers,
Hi,
The first thing I'd recommend you try is upgrading both your Python and wxPython releases. I don't have Python 2.5 myself, but I noticed it says "alpha" in the Python version number, so I suspect that was one of the initial Python 2.5 releases for Mac.
On wxPython 2.8.4.0 on Python 2.4, when I run DrPython I don't get any errors, but I do get a bunch of debug warnings because DrPython is trying to set the font to faces/configurations that don't exist on the OS X system I'm running it on. The offending font names seem to be "Courier 10 Pitch", "Sans" and "Sans Serif". Also, the latter two seem very odd to me as those aren't really face names, they're font families - specifically, the wxFONTFAMILY_ROMAN and wxFONTFAMILY_SWISS families.
Anyway, please let me know if it is still crashing for you with wxPython 2.8.4.0 and the latest Python 2.5. If so, I'll make a note of it on the wxPython lists and hopefully someone setup for 2.5 can take a look at it.
Thanks,
Kevin
"Sans" and "Sans Serif" are typical aliases that are used on Linux systems, and the user can have whatever are their favorite fonts aliased to these names. They are not real font face names, but this is a common trap that Linux programmers fall into. IMO the best thing to do for any wx app to do is to default only to font families and not hard code any face names at all if possible. Then let the user choose which fonts to use and save those face names in a config file. Even then it's still a good idea to verify the names saved in the config file with the wx.FontEnumerator.
Hello Robin and Kevin, thank you very much for your recommendation and analysis, and also for taking your time, answering here directly! :)
Your suggestions are very helpful.
I (or any other DrPython fellow) will try to make a clean solution for that.
Cheers,
Franz
@Herberto and/or Dominique:
You are invited to submit a patch for that, if you want
and the problem is solved! :)
Hi All,
I uninstalled wxpython 2.8.3.0 and installed the latest version ie 2.8.4.0.
Guess what happened...
It works fine.
That's great.
Thank you all for your help and your time spent for me.
May I advise the persons in charge of DrPython to put it clear (on the web site and / or in the ReadMe) that in case it doesn't work, the first thing to try is to re-install wxpython with the latest version.
Anyway, thank you so much.
It is really a great pleasure to have people trying to help (this apply of course also to wxPython users'list).
Thanks again
Dominique
Great! You're welcome.
I added it to the notes.txt.
Thank you for not giving up! ;)
Hem Hem Hem...
Well I thought it worked...
Once drpython runs, when I try to run any application, the shell prints execvp failed with erro 2.
Below is the shell print:
"Applications/MacPython 2.5/IDLE.app/Contents/MacOS/Python -u "/Volumes/Macintosh HD/Users/ag/Desktop/COMPTAS/ ECV/nbtest.py"
execvp(/Applications/MacPython, 2.5/IDLE.app/Contents/MacOS/Python, -u, /Volumes/Macintosh HD/Users/ag/Desktop/COMPTAS/ ECV/nbtest.py) failed with error 2!"
Please note that it happens for applications that works as well as for tests (example: print "oops")
Any idea?
We are not far from the end I hope...
Thanks
Dominique
OK. Now it works fine.
I would suggest people in charge of drpython to put this procedure in the ReadMe and to stick it up in the help forum and the website... This will save hours to others to search for good infos and nice people to help...
Thank you all
1) Re-install both python and wxpython with the latest versions.
2) Download TinkerTool to enable access to hidden directories and files. Otherwise,
3) Throw away the former ".drpython" preferences directory (located for me in /Users/MyUserName/Library/Preferences)
4) Install and launch drpython. Close it
5) Go to drPreferences.py and change the "Courier 10 Pitch" and "Sans" fonts with a view to having something like:
if self.platform_is_windows:
defaultfont0="Courier"
defaultfont1="MS Sans Serif"
else:
defaultfont0="Comic Sans MS"#"Courier 10 Pitch"
defaultfont1="Comic Sans MS"#"Sans"
6) Go to preferences.dat in the "/Users/MyUserName/Library/Preferences/.drpython" directory.
There, search for "Sans" and "Sans Serif" and possibly ""Courier 10 Pitch" and replace them with a mac known font (ex: Comic Sans MS). Save.
You can work...
Again thanks to all for your time and your help...
I forgot something.
To launch drpython directly, without having to go through IDLE, right click on the drpython.pyw file, choose open with Python Launcher (make sure to choose the right python launcher if you have several installs).
Bye
Dominique
Thank you Dominique, I added it to the readme.txt and checked it in.