USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

Stani's Python Editor - Fails to load

 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Shell Scripting and Programming
View previous topic :: View next topic  
Author Message
fopetesl
Jr. Member


Joined: 27 Aug 2024
Posts: 85
Location: N.Yorkshire UK

PostPosted: Fri Aug 08, 2024 8:59 am    Post subject: Stani's Python Editor - Fails to load Reply with quote

I have just installed Mandriva 2024 along with wxPython and Stani's Python Editor. When I try to run SPE:
Code:
[peter@localhost ~]$ spe

Spe Warning: Spe was developped on wxPython v2.6.1.0., but v2.8.4.2. was found.
If you experience any problems please install wxPython v2.6.1.0.


SPE v0.8.2.a (c)2003-2005 www.stani.be

If spe fails to start:
 - type "python SPE.py --debug > debug.txt 2>&1" at the command prompt
   (or if you use tcsh: "python SPE.py --debug >& debug.txt")
 - send debug.txt with some info to spe.stani.be[at]gmail.com
 
Blender support disabled (run SPE inside Blender to enable).

Encrypted debugging disabled.
  If you prefer encrypted debugging, install the "Python Cryptography Toolkit"
  from http://www.amk.ca/python/code/crypto

Launching application...
[peter@localhost ~]$


but it doesn't launch - nothing in
Code:

ps -A | grep spe


I think the latest SPE is v0.8.4 but the rpm isn't in my repositories.
I'm not too happy about 'upgrading' SPE from source since it will bypass my Package Manager, i.e. future uninstalls would be a problem, (for me).

www.stani.be seems defunct since it throws up a Google search for "stani michiels" so no help there.


Back to top
View user's profile Send private message
Lord.DragonFly.of.Dawn
Advanced Member


Joined: 18 Jul 2024
Posts: 607
Location: South Portland, Maine, USA, Earth, Sol System

PostPosted: Fri Aug 08, 2024 1:23 pm    Post subject: Reply with quote

Using gentoo the latest version in portage seems to be 0.8.3.c

The URI for the source tarball is here

or you could visit http://pythonide.stani.be/ and use the download links on the righthand side of the page. this will, among other things give you access some RPMs that you can use.

Also I would pay attention to the first warning you recieve regarding wxPython. It seems you have a newer version than spe was expecting and that could be the cause of your problems. try installing the version that spe expects and see if that helps



_________________
ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)

PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
Back to top
View user's profile Send private message Visit poster's website
fopetesl
Jr. Member


Joined: 27 Aug 2024
Posts: 85
Location: N.Yorkshire UK

PostPosted: Fri Aug 08, 2024 2:23 pm    Post subject: Reply with quote

As a Newb will this rpm work for Mandriva?
spe-0.8.4.h-0.2.fc8.noarch.rpm
It appears to my uneducated eye that it's for Fedora Core 8(?) and I don't know if there's any (significant) difference between FC8 & Mandriva Confused


Back to top
View user's profile Send private message
Lord.DragonFly.of.Dawn
Advanced Member


Joined: 18 Jul 2024
Posts: 607
Location: South Portland, Maine, USA, Earth, Sol System

PostPosted: Fri Aug 08, 2024 2:52 pm    Post subject: Reply with quote

AFAIK - The biggest difference that could foul you up here is the directory structures.

It all comes down to where Mandriva put certain libraries and executables.

I think the fedora rpm will work without issues, but I cannot guarantee it.



_________________
ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)

PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
Back to top
View user's profile Send private message Visit poster's website
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Fri Aug 08, 2024 2:59 pm    Post subject: Reply with quote

Lord.DragonFly.of.Dawn wrote:
AFAIK - The biggest difference that could foul you up here is the directory structures.

It all comes down to where Mandriva put certain libraries and executables.

I think the fedora rpm will work without issues, but I cannot guarantee it.


I would give it about a 30% chance of working. Fedora and Mandriva are usually quite different in their libraries, even when they are running practically the same thing. This is one of the issues that drives software integrators crazy and a major reason why ISVs are so reluctant to "port to Linux" - when they do so, they get only one vendor's idea of what Linux is, and only for that release.

Better packaging with less reliance on quirks in libraries is something that is badly needed.



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
VHockey86
Advanced Member


Joined: 12 Dec 2024
Posts: 988
Location: Rochester

PostPosted: Fri Aug 08, 2024 3:20 pm    Post subject: Reply with quote

Look at the debug output and figure out why it is failing to launch rather than hunting around for random RPMs.

It doesn't depend on any kind of funky C libraries, its just python code. I'm guessing its a wxpython related problem, but look at the debug output anyways. Quite a bit of junk changed in wxpython 2.6-->2.7 if I recall correctly.

And personally since its just a python app I would simply install it from source and see if that works.
Uninstalling it would be very trivial, everything that its going to install is going to end up in the "site-packages" folder of your python install - its quite self contained.

Something like

/usr/lib/python24/site-packges/spe

is where you'll find everything. The lib path will depend a bit on the distro.


Back to top
View user's profile Send private message
Lord.DragonFly.of.Dawn
Advanced Member


Joined: 18 Jul 2024
Posts: 607
Location: South Portland, Maine, USA, Earth, Sol System

PostPosted: Fri Aug 08, 2024 3:25 pm    Post subject: Reply with quote

masinick wrote:
Lord.DragonFly.of.Dawn wrote:
AFAIK - The biggest difference that could foul you up here is the directory structures.

It all comes down to where Mandriva put certain libraries and executables.

I think the fedora rpm will work without issues, but I cannot guarantee it.


I would give it about a 30% chance of working. Fedora and Mandriva are usually quite different in their libraries, even when they are running practically the same thing. This is one of the issues that drives software integrators crazy and a major reason why ISVs are so reluctant to "port to Linux" - when they do so, they get only one vendor's idea of what Linux is, and only for that release.

Better packaging with less reliance on quirks in libraries is something that is badly needed.


I would bow to your knowledge in this situation. I've never dealt with Mandriva personally and I have very little experience with Fedora.



_________________
ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)

PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
Back to top
View user's profile Send private message Visit poster's website
fopetesl
Jr. Member


Joined: 27 Aug 2024
Posts: 85
Location: N.Yorkshire UK

PostPosted: Fri Aug 08, 2024 3:51 pm    Post subject: Reply with quote

VHockey86 wrote:
Look at the debug output and figure out why it is failing to launch rather than hunting around for random RPMs.

It doesn't depend on any kind of funky C libraries, its just python code. I'm guessing its a wxpython related problem, but look at the debug output anyways. Quite a bit of junk changed in wxpython 2.6-->2.7 if I recall correctly.

And personally since its just a python app I would simply install it from source and see if that works.
Uninstalling it would be very trivial, everything that its going to install is going to end up in the "site-packages" folder of your python install - its quite self contained.

Something like

/usr/lib/python24/site-packges/spe

is where you'll find everything. The lib path will depend a bit on the distro.

I can't get any debug output, at least not from:
python SPE.py --debug > debug.txt 2>&1
since SPE.py doesn't exist on my system. I'm guessing SPE.py is part of v0.8.4 so not available in my present version Sad

And, I'm sorry but uninstalling may be very trivial to you but to me with my present experience it sounds like a nightmare. That's why I was hoping that the FC8 rpm might be an answer since I could backtrack without too much pain.

Ah! I said "SPE.py doesn't exist on my system" which now I've done some more digging turns out to be false. It's in:
/usr/lib/python2.5/site-packages/_spe so I ran
Code:
[peter@localhost ~]$ python /usr/lib/python2.5/site-packages/_spe/SPE.py --debug > debug.txt 2>&1
[peter@localhost ~]$ cat debug.txt

Spe Warning: Spe was developped on wxPython v2.6.1.0., but v2.8.4.2. was found.
If you experience any problems please install wxPython v2.6.1.0.


SPE v0.8.2.a (c)2003-2005 www.stani.be

If spe fails to start:
 - type "python SPE.py --debug > debug.txt 2>&1" at the command prompt
   (or if you use tcsh: "python SPE.py --debug >& debug.txt")
 - send debug.txt with some info to spe.stani.be[at]gmail.com
 

Spe Warning: Spe was developped on wxPython v2.6.1.0., but v2.8.4.2. was found.
If you experience any problems please install wxPython v2.6.1.0.

Blender support disabled (run SPE inside Blender to enable).

Encrypted debugging disabled.
  If you prefer encrypted debugging, install the "Python Cryptography Toolkit"
  from http://www.amk.ca/python/code/crypto

Spe is running in debugging mode with this configuration:
- platform  : linux2
- python    : 2.5.1
- wxPython  : 2.8.4.2.
- interface : <default>
- encoding  : UTF-8

Launching application...
Create: Framework: menu.
Create: Framework: toolbar.
Create: Framework: statusbar.
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/_spe/SPE.py", line 209, in <module>
    style           = style)
  File "/usr/lib/python2.5/site-packages/_spe/sm/wxp/smdi.py", line 1278, in __init__
    wx.App.__init__(self,redirect=not debug)
  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7818, in __init__
    self._BootstrapApp()
  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7415, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/_spe/sm/wxp/smdi.py", line 1298, in OnInit
    **self.attributes)
  File "/usr/lib/python2.5/site-packages/_spe/sm/wxp/smdi.py", line 801, in __init__
    Parent.__init__(self,app=app,page=page,**options)
  File "/usr/lib/python2.5/site-packages/_spe/sm/wxp/smdi.py", line 596, in __init__
    **options)
  File "/usr/lib/python2.5/site-packages/_spe/sm/wxp/smdi.py", line 325, in __init__
    self.__statusBar__()
  File "/usr/lib/python2.5/site-packages/_spe/sm/wxp/smdi.py", line 417, in __statusBar__
    self.statusBar = self.app.StatusBar(parent=self,id=wx.ID_ANY)
  File "/usr/lib/python2.5/site-packages/_spe/Menu.py", line 727, in __init__
    self.throbber   = Throbber(self,'throbber_still.gif')
  File "/usr/lib/python2.5/site-packages/_spe/Menu.py", line 733, in __init__
    GIFAnimationCtrl.__init__(self,statusBar,-1,info.imageFile(fileName))
  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/animate.py", line 242, in __init__
    self.LoadFile(filename)
  File "/usr/lib/python2.5/site-packages/_spe/Menu.py", line 746, in LoadFile
    if fileName != self._fileName and not self._running:
AttributeError: 'Throbber' object has no attribute '_fileName'
[peter@localhost ~]$
How on Earth do I unscramble this? Confused

I guess I've got more RTFM'ing to do than I first thought.

I really don't want to give up on this Rolling Eyes so where to next?


Back to top
View user's profile Send private message
VHockey86
Advanced Member


Joined: 12 Dec 2024
Posts: 988
Location: Rochester

PostPosted: Fri Aug 08, 2024 4:03 pm    Post subject: Reply with quote

it's definitely a wxpython related problem, but I think its just a bug with SPE and using a newer version of wxpython.

If you look at the end of the code trace, SPE is trying to access "_fileName". Variables prefixed with and underscore in python typically denote a "hidden" variable (its not actually hidden its just a convention).

So in other words. In a latter version of wxPython ( 2.7 or 2.8 ) this variable was renamed/removed/changed and now the SPE code doesn't work. So you basically have 3 options.

a) Unintall wxpython 2.8.x and try to find an RPM for wxpython 2.6.x.
b) Install the latest version of SPE that actually supports wxpython 2.8
c) Fix the SPE code (it would probably be pretty easy to fix that particular error, but chances are you'll run into a lot more)...so not too practical.

That said...WingIDE is better than SPE anyways so you could give that a try as an alternative Smile


Back to top
View user's profile Send private message
VHockey86
Advanced Member


Joined: 12 Dec 2024
Posts: 988
Location: Rochester

PostPosted: Fri Aug 08, 2024 4:08 pm    Post subject: Reply with quote

Oh, and to answer your question about uninstalling...

Code:

rm -rf /usr/lib/python2.5/site-packages/_spe


That's all you need to do really...there might be 1 or 2 installation info files lingering in the root of .../site-packages/ depending on how SPE is packaged, but nothing to be concerned about.



_________________
Main Desktops : Kubuntu 10.4. ArchLinux 64-bit. Windows7 64-bit. Windows XP 32-bit.

MacBook: OS X Snow Leopard (10.6)
Back to top
View user's profile Send private message
fopetesl
Jr. Member


Joined: 27 Aug 2024
Posts: 85
Location: N.Yorkshire UK

PostPosted: Fri Aug 08, 2024 5:27 pm    Post subject: Reply with quote

I'll certainly investigate WingIDE. I only arrived at SPE because it looked like an easy (?) entry into wxPython and GUI programming.

I worry about CLI installation not because it's difficult but because
a) it might break something else, libraries, etc.
b) because whenever I've attempted it previously there are always dependencies which, when they're all installed, seem to break something else. urpmi seems to mostly get around that pain.

I'll check it out tomorrow.

And thanks.


Back to top
View user's profile Send private message
VHockey86
Advanced Member


Joined: 12 Dec 2024
Posts: 988
Location: Rochester

PostPosted: Fri Aug 08, 2024 8:37 pm    Post subject: Reply with quote

Most python software installed from source only relies on other python libraries being installed.

Sometimes python libraries have C code that would need to link against SO files and stuff in the system - but it definitely wouldn't replace them with different versions. Also I've never ran into a module installed from source that produced any junk outside of the site-packages folder. The distutils package which handles all python module installation is very good about that.

I certainly wouldn't worry about it breaking anything else.


Back to top
View user's profile Send private message
fopetesl
Jr. Member


Joined: 27 Aug 2024
Posts: 85
Location: N.Yorkshire UK

PostPosted: Sat Aug 09, 2024 10:18 am    Post subject: WingIDE? Reply with quote

I had a look at WingIDE and it does seem to be all singing, all dancing except little or no mention of GUI programming. By that I mean it doesn't seem to be geared toward GUI programming.

Purists would say I'm going about it the (easy) wrong way and should hand code everything to keep control but please bear in mind I'm about to tackle several parts of programming I've never seen before.

My other comment is that WingIDE seems a commercial product.
Not that I'm against such but there is a possibility that my project may go commercial in the future and I'm not exactly flushed with cash Sad

I'll persist with SPE for today and if I don't succeed have a trial with WingIDE.


Back to top
View user's profile Send private message
fopetesl
Jr. Member


Joined: 27 Aug 2024
Posts: 85
Location: N.Yorkshire UK

PostPosted: Sat Aug 09, 2024 2:54 pm    Post subject: Getting somewhere?? Reply with quote

Well I thought I'd made progress. I can get SPE to run but only if I'm actually in the _spe directory:
Code:
[peter@localhost _spe]$ python SPE.py

SPE v0.8.4.h (c)2003-2008 www.stani.be

If spe fails to start:
 - type "python SPE.py --debug > debug.txt 2>&1" at the command prompt
   (or if you use tcsh: "python SPE.py --debug >& debug.txt")
 - send debug.txt with some info to spe.stani.be[at]gmail.com
 
Blender support disabled (run SPE inside Blender to enable).

Encrypted debugging disabled.
  If you prefer encrypted debugging, install the "Python Cryptography Toolkit"
  from http://www.amk.ca/python/code/crypto

Launching application...

Thank you for using SPE, please donate to support further development.
[peter@localhost _spe]$
Digging further it seemed I should have the _spe directory as:
/usr/lib/python2.5/site-packages/_spe
so, after checking permissions, I copied the _spe directory from my ~/ to /usr/lib/python2.5/site-packages/_spe and attempted to run it again
Code:
[peter@localhost _spe]$ spe
bash: spe: command not found
[peter@localhost _spe]$
assuming that I had now put it in the correct path.
So I looked at paths:
Code:
[peter@localhost ~]$ echo $PYTHONPATH
:/usr/lib/ooo-2.2/program:/usr/lib/ooo-2.2/program
[peter@localhost ~]$ echo $PATH
/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt3//bin:/home/peter/bin:/usr/lib/qt3//bin
[peter@localhost ~]$ python
Python 2.5.1 (r251:54863, Apr 12 2024, 01:32:47)
[GCC 4.2.2 20241128 (prerelease) (4.2.2-3.1mdv2008.0)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', '/home/peter', '/usr/lib/ooo-2.2/program', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/Numeric', '/usr/lib/python2.5/site-packages/gtk-2.0', '/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode']
>>>
So it appears that all my PATHs are incorrect or incomplete Sad

/usr/lib/python25.zip doesn't exist on my system so where did that come from.

I could do with some tips as to what and how I should modify the PATHs especially the python sys.path. Googling so far hasn't helped with the latter.


Back to top
View user's profile Send private message
Lord.DragonFly.of.Dawn
Advanced Member


Joined: 18 Jul 2024
Posts: 607
Location: South Portland, Maine, USA, Earth, Sol System

PostPosted: Sat Aug 09, 2024 7:22 pm    Post subject: Reply with quote

name this script as /usr/local/bin/spe or your favorite name. add execute permissions and try running it from your home directory. Does it work?
Code:
#!/bin/bash
#
# A workaround to get SPE working
#

cd /usr/lib/python2.5/site-packages/_spe
python SPE.py



_________________
ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)

PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Shell Scripting and Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All content © 2024-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2024-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse