Services-pyglet

Discussion about user contributed plugins

Moderator: Moderator

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Services-pyglet

Postby Uatschitchun » Mon Nov 24, 2008 8:19 am

I tried services-0.3 and I get this one:
Traceback (most recent call last):
File "/etc/mms/scripts/services-0.3/services.py", line 110, in <module>
win = Services()
File "/etc/mms/scripts/services-0.3/services.py", line 66, in __init__
self.bg = mmsv2gui.ImageControl(0, 0, self.getWidth(), self.getHeight(), "general/bg.png")
AssertionError: Window.__init__() not called
PyRun_SimpleFile return -1
Lg
Roman

esprit
master
Posts: 503
Joined: Tue Dec 06, 2005 5:50 pm
Location: France
Contact:

Re: Services-pyglet

Postby esprit » Thu Nov 27, 2008 6:44 pm

Ok, I updated the pyglet, but I got another problem (if Fredde is here perhaps he could help).

I now have this one :
Traceback (most recent call last):
File "/etc/mms/scripts/services-0.3/main.py", line 115, in <module>
win = Services()
File "/etc/mms/scripts/services-0.3/main.py", line 94, in __init__
self.refresh()
File "/etc/mms/scripts/services-0.3/main.py", line 65, in refresh
serv.check()
File "/etc/mms/scripts/services-0.3/main.py", line 40, in check
t = commands.getstatusoutput(self.service[STATUS_IDX])
File "/usr/lib/python2.5/commands.py", line 55, in getstatusoutput
sts = pipe.close()
IOError: [Errno 10] Aucun processus enfant
PyRun_SimpleFile return -1

"Aucun processus enfant" means "No child process".

Everything was fine before (I didn't use it for month, so I can't tell when that breaks).
commands.py is a standard Python module to exec UNIX commands.

Could it be a problem with an mms-python module change ?

User avatar
MartinZ
Posts: 23
Joined: Wed Nov 19, 2008 2:04 pm

Re: Services-pyglet

Postby MartinZ » Sat Nov 29, 2008 11:46 pm

I want to use services plugin to start and stop rtorrent (as I start it thru init.d) but services pyglet did not open at all on my system. Where can be the problem?

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: Services-pyglet

Postby Uatschitchun » Sun Nov 30, 2008 12:24 pm

Problem is, Fredde is missing :P
Lg

Roman

User avatar
MartinZ
Posts: 23
Joined: Wed Nov 19, 2008 2:04 pm

Re: Services-pyglet

Postby MartinZ » Sun Nov 30, 2008 8:29 pm

How long? Did someone try to call his/her mother? !!!!!!!!!!!
(joke)

Fredde
veteran
Posts: 288
Joined: Tue Dec 06, 2005 7:18 am
Location: Sweden

Re: Services-pyglet

Postby Fredde » Mon Dec 01, 2008 12:04 pm

I got a call from my mother... :D

I have promised to fix a lot of stuff, but have been short of time :oops:

Well, now I got the time and will start to fix the problems.

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: Services-pyglet

Postby Uatschitchun » Tue Dec 09, 2008 8:02 am

As far as I can see, this is the last pyglet missing some fixes ... oO
Lg

Roman

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: Services-pyglet

Postby Uatschitchun » Fri Dec 12, 2008 7:40 am

esprit, are you at it?
Lg

Roman

esprit
master
Posts: 503
Joined: Tue Dec 06, 2005 5:50 pm
Location: France
Contact:

Re: Services-pyglet

Postby esprit » Fri Dec 12, 2008 8:20 am

I need Fredde to ensure that the problem is not in mms-python, cause I can't see where the problem is...

esprit
master
Posts: 503
Joined: Tue Dec 06, 2005 5:50 pm
Location: France
Contact:

Re: Services-pyglet

Postby esprit » Sat Dec 13, 2008 1:20 pm

Ok, I just have tested services pyglet after upgrading mms today, and the problem seems to be fixed (don't know if it was in MMS, or if it was something else updated on my system) :)
http://eesprit.free.fr/mms/python/services-0.4.tgz

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: Services-pyglet

Postby Uatschitchun » Sun Dec 14, 2008 9:57 am

Still getting this one:
Traceback (most recent call last):
File "/etc/mms/scripts/services-0.4/main.py", line 116, in <module>
win = Services()
File "/etc/mms/scripts/services-0.4/main.py", line 95, in __init__
self.refresh()
File "/etc/mms/scripts/services-0.4/main.py", line 66, in refresh
serv.check()
File "/etc/mms/scripts/services-0.4/main.py", line 41, in check
t = commands.getstatusoutput(self.service[STATUS_IDX])
File "/usr/lib/python2.5/commands.py", line 55, in getstatusoutput
sts = pipe.close()
IOError: [Errno 10] No child processes
PyRun_SimpleFile return -1
Lg

Roman

esprit
master
Posts: 503
Joined: Tue Dec 06, 2005 5:50 pm
Location: France
Contact:

Re: Services-pyglet

Postby esprit » Sun Dec 14, 2008 10:20 am

Damned, got it back to, it was working yesterday :shock:

christophb
Posts: 25
Joined: Sat Jan 03, 2009 3:30 pm
Location: Lehrte, Germany
Contact:

Re: Services-pyglet

Postby christophb » Tue Jan 12, 2010 9:26 pm

I'm not a Python developer, but I coded some other languages in my jobs since 1975 ...
So I tried some debugging and experimenting (is this an english word?).

My results:

  • When I remove all entries from the services array, the pyglet starts and shows only the initialized window without any services - of course.
  • I put a some more complex command into the services array, like this which checks if my vdr server is up:

    Code: Select all

    services = [["Kanotix server", 'ping -c 1 kanotix |grep "1 received" > /dev/null', '/etc/zendeb/etherwake.sh', '/bin/true'],
           ]

    Now, when pressing the services pyglet multiple times, I sometimes get the error and sometimes get a successful display of the service!!
Conclusions:
  • As some other pyglets are running, the pyglet plugin itself should be OK.
  • The error seems to be depending on the kind of process we start from services pyglet.
  • Something must have changed in the environment since former releases, when the services plugin did run well. Could it be MMS itself or the Pyglet plugin or whatever?

in several threads there are some hints zu change from "commands" to "subprocesses", but this is documented for Python 3 and we have Python 2.5.
Can and should we change to Python 3 without getting bad side effects?

Is there any Python devolper who can assist here, so we can get some steps further? I think it's a cool pyglet.

Christoph
MMS 1.1.1 on T-Online Vision with zendeb 0.4.1-beta1
Controlling a remote kanotix based c't vdr.
Playing files from different CIFS and nfs mounts.

christophb
Posts: 25
Joined: Sat Jan 03, 2009 3:30 pm
Location: Lehrte, Germany
Contact:

Re: Services-pyglet

Postby christophb » Thu Jan 14, 2010 7:44 pm

I made some further searches and tests. Using subprocess instead of commands does not change the behaviour.

Finally I think it's a Python bug like described here: http://mail.python.org/pipermail/python-bugs-list/2007-August/039194.html

With the test script from that bug entry I can reproduce the following on my S100, which has only one cpu:
  • Running the script from shell with more than one thread raises the NoChild error.
  • Running the script from shell with more than one thread and a command like "ls -ll" instead of "sleep 0" not all threads throw the NoChild error.
  • Running the same script with only 1 thread, no error occurs, but ...
  • Running the same script with only 1 thread from the MMS Pyglet plugin it raises the NoChild error!
The results are similar to my former tests above.
I think the other pyglets, which are also using commands ore subprocess run successful, because they execute more complex commands.

I found a bugfix entry for ReadHat from September 2009, which contains a fix, which seem to be ours: http://rhn.redhat.com/errata/RHBA-2009-1402.html

And now, who can give us a bug fixed version of Python?

Christoph
MMS 1.1.1 on T-Online Vision with zendeb 0.4.1-beta1
Controlling a remote kanotix based c't vdr.
Playing files from different CIFS and nfs mounts.

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: Services-pyglet

Postby Uatschitchun » Fri Jan 15, 2010 7:22 am

First check if the bugfix also applies for python2.5, as the redhat link states python2.4.

Second check, if the bugfix has went upstream (ask python devels).

Third, if the bugfix went upstream, check if debian uses the updated upstream or, if not, check, if debian packages added the bugfix.

If bugfix went upstream but debian packages doesn't use the fixed upstream, ask them for updating
If bugfix didn't went upstream, ask python-devel to add it and debian to update the package.

To make a long story short: Someone need to fix the bug ;)
a) python, b) debian, c) you for yourself with a selfcompiled package

These 2 links may help:
http://packages.debian.org/changelogs/p ... /changelog
http://bugs.debian.org/python2.5
Lg

Roman


Return to “user plugins”

Who is online

Users browsing this forum: No registered users and 3 guests