|
| Author |
Message |
species8472jj
Joined: 26 Jan 2010 Posts: 23
|
Posted: Tue Apr 03, 2012 1:51 am Post subject: Issues with pyTivo Service |
|
|
I keep getting an issue with my pyTivo service on Windows 7.
What happens is when I reboot my PC, the pyTivo service doesn't start automatically.
I get the following error
"Windows could not start the pyTivo on Local Computer. For more information, review the System Event log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 1."
What I end up doing is uninstall and reinstall the pytivo service. Once I do that, I can start the service and it works fine.
But if I need to reboot the machine, I have to uninstall and install the service again in order to get pyTivo working.
Thanks in advance for the help. |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 2009 Location: Maryland
|
Posted: Tue Apr 03, 2012 2:12 am Post subject: |
|
|
So, did you review the System Event log?
The only place I see where pyTivo returns error code 1 is here:
| Code: | if sys.version_info[0] != 2 or sys.version_info[1] < 4:
print ('ERROR: pyTivo requires Python >= 2.4, < 3.0.\n')
sys.exit(1) |
But if that were your problem, it should be failing consistently. _________________ My pyTivo fork . My page |
|
| Back to top |
|
 |
lucasnz
Joined: 13 Sep 2010 Posts: 251
|
Posted: Tue Apr 03, 2012 10:52 am Post subject: |
|
|
I've had problems with the pyTivo service (when set up as per the wiki). My installer script (which is still in beta) takes a slightly different approach to setting up the pytivo service which I've found more reliable. Instead of using python to create the service I used the sc.exe command to create the service e.g.
sc.exe create "pyTivo" binPath= "pyTivopath\pyTivoService.exe" start= auto
You need to get the pyTivoService.exe and ini files and place them in the pytivo folder, from the installer script (located here: http://pytivo.sourceforge.net/forum/pytivo-windows-installer-beta-v0-2-t1937.html)
You also need to edit pyTivoService.ini and add the following lines to the end of the file;
CommandLine = "pythonpath\python.exe" "pyTivopath\pyTivo.py"
WorkingDir= "pyTivopath"
Alternatively you could try the installer (if you have windows vista or newer) but this comes with a caveat, it might not work as it's still beta. |
|
| Back to top |
|
 |
philhu
Joined: 04 Jan 2008 Posts: 474
|
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 2009 Location: Maryland
|
Posted: Tue Apr 03, 2012 4:04 pm Post subject: |
|
|
| lucasnz wrote: | I've had problems with the pyTivo service (when set up as per the wiki). |
What problems did you have?
| Quote: | You need to get the pyTivoService.exe and ini files |
Where does pyTivoService.exe come from, originally? Where is the source code? _________________ My pyTivo fork . My page |
|
| Back to top |
|
 |
reneg
Joined: 04 Jan 2008 Posts: 160
|
|
| Back to top |
|
 |
lucasnz
Joined: 13 Sep 2010 Posts: 251
|
Posted: Tue Apr 03, 2012 8:56 pm Post subject: |
|
|
@reneg; thanks, good to know. I'd just pulled it out of the old msi installer, so wasn't sure where it came from.
@wmcbrine; The issue I had may, or may not be related to the one described here. I came to the conclusion that my problem was related to the service launching python directly. Basically when I stopped the service, it was reported to be stopped (to windows) when in fact python (& pytivo) were still running. pytivo would eventually stop (after about half a second) but this resulted errors in the event log. This meant that if you did things like restart the service, when the service was reported to windows that it was stopped, it would then try to initiate a service start, which would fail because pytivo was already running... Or something to that effect.
Also from an installer point of view it's easier to create the service this way rather than relying on the user to install the component required.
Luke |
|
| Back to top |
|
 |
species8472jj
Joined: 26 Jan 2010 Posts: 23
|
Posted: Sun Apr 08, 2012 4:41 pm Post subject: |
|
|
I been playing with this, and I am still getting the error 1 (outlined above).
I have cut an pasted my log file below. I did correct the tivodecode warning.
I hope this will help. If not, please let me know - while this problem isn't horrible, and I can still use pytivo, it is annoying.
Thanks in advance for the help.
File "C:\Program Files\Python27\lib\SocketServer.py", line 582, in process_request_thread
self.finish_request(request, client_address)
File "C:\Program Files\Python27\lib\SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Program Files\pyTivo\httpserver.py", line 72, in __init__
client_address, server)
File "C:\Program Files\Python27\lib\SocketServer.py", line 639, in __init__
self.handle()
File "C:\Program Files\Python27\lib\BaseHTTPServer.py", line 337, in handle
self.handle_one_request()
File "C:\Program Files\Python27\lib\BaseHTTPServer.py", line 313, in handle_one_request
self.raw_requestline = self.rfile.readline()
File "C:\Program Files\Python27\lib\socket.py", line 445, in readline
data = self._sock.recv(self._rbufsize)
error: [Errno 10054] An existing connection was forcibly closed by the remote host
2012-04-08 11:30:36,111 INFO pyTivo: 127.0.0.1 [08/Apr/2012 11:30:36] "GET / HTTP/1.1" 200 -
2012-04-08 11:30:36,131 INFO pyTivo: 127.0.0.1 [08/Apr/2012 11:30:36] "GET /main.css HTTP/1.1" 200 -
2012-04-08 11:30:36,177 INFO pyTivo: 127.0.0.1 [08/Apr/2012 11:30:36] code 404, message Not Found
2012-04-08 11:30:36,177 INFO pyTivo: 127.0.0.1 [08/Apr/2012 11:30:36] "GET /favicon.ico HTTP/1.1" 404 -
2012-04-08 11:30:38,328 WARNING pyTivo.config: tivodecode not found
2012-04-08 11:30:44,242 INFO pyTivo: 127.0.0.1 [08/Apr/2012 11:30:44] "GET /TiVoConnect?Command=NPL&Container=ToGo&TiVo=192.168.1.150 HTTP/1.1" 200 -
2012-04-08 11:30:44,276 INFO pyTivo: 127.0.0.1 [08/Apr/2012 11:30:44] "GET /main.css HTTP/1.1" 200 -
2012-04-08 11:30:44,334 INFO pyTivo: 127.0.0.1 [08/Apr/2012 11:30:44] "GET /folder.png HTTP/1.1" 200 -
2012-04-08 11:30:44,338 INFO pyTivo: 127.0.0.1 [08/Apr/2012 11:30:44] "GET /kuid.png HTTP/1.1" 200 -
2012-04-08 11:30:44,345 INFO pyTivo: 127.0.0.1 [08/Apr/2012 11:30:44] "GET /expired.png HTTP/1.1" 200 -
2012-04-08 11:30:44,815 INFO pyTivo: 127.0.0.1 [08/Apr/2012 11:30:44] "GET /nocopy.png HTTP/1.1" 200 -
2012-04-08 11:30:44,822 INFO pyTivo: 127.0.0.1 [08/Apr/2012 11:30:44] code 404, message Not Found
2012-04-08 11:30:44,822 INFO pyTivo: 127.0.0.1 [08/Apr/2012 11:30:44] "GET /favicon.ico HTTP/1.1" 404 -
2012-04-08 11:33:04,911 INFO pyTivo.beacon: Unregistering: Media Drive Music pyTiVo Videos on Jim |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 2009 Location: Maryland
|
Posted: Sun Apr 08, 2012 5:31 pm Post subject: |
|
|
Well, this is the end portion of a normal-looking pyTivo log (including the typical error that appears when the TiVo rejects a transfer, but that's a different issue), with a clean exit. I don't see anything related to the error 1 problem here. I can see that it's not the latest version of pyTivo, but that's probably not relevant either.
The System Event log is something else, a Windows thing: http://answers.yahoo.com/question/index?qid=20071005095943AA7HJwl
But I'm not optimistic that it will have any relevant info, sorry. _________________ My pyTivo fork . My page |
|
| Back to top |
|
 |
species8472jj
Joined: 26 Jan 2010 Posts: 23
|
Posted: Sun Apr 08, 2012 11:17 pm Post subject: Event Log |
|
|
I did check out the event viewer, and there is an error it logged related to pyTivo.
Please see the details below.
I suppose my next step would be to install the latest version of pyTivo. I know you mentioned it probably would not solve the problem, but by the same token, it can't hurt.
Thanks again for the help.
Log Name: System
Source: Service Control Manager
Date: 4/8/2012 11:33:28 AM
Event ID: 7024
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: Jim
Description:
The pyTivo service terminated with service-specific error Incorrect function..
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
<EventID Qualifiers="49152">7024</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2012-04-08T16:33:28.891832100Z" />
<EventRecordID>23797</EventRecordID>
<Correlation />
<Execution ProcessID="872" ThreadID="2648" />
<Channel>System</Channel>
<Computer>JimsAwesomePC</Computer>
<Security />
</System>
<EventData>
<Data Name="param1">pyTivo</Data>
<Data Name="param2">%%1</Data>
</EventData>
</Event>[/img] |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 2009 Location: Maryland
|
Posted: Mon Apr 09, 2012 2:51 am Post subject: Re: Event Log |
|
|
| species8472jj wrote: | The pyTivo service terminated with service-specific error Incorrect function.. |
There may be more info in the Application Event Log:
http://technet.microsoft.com/en-us/library/aa997769%28v=exchg.65%29.aspx
A quick google of that error (without the "pyTivo" part) shows a lot of results where there was a previous instance of the server already running, binding some needed port(s). That could apply here, too... _________________ My pyTivo fork . My page |
|
| Back to top |
|
 |
species8472jj
Joined: 26 Jan 2010 Posts: 23
|
Posted: Tue Apr 10, 2012 2:12 am Post subject: |
|
|
I just checked the Application Event Log.
Here is what it shows... (there is an error it logged)
Log Name: Application
Source: Python Service
Date: 4/9/2012 9:10:43 PM
Event ID: 128
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: Jims
Description:
Could not locate the module name in the Python class string (ie, no '.')
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Python Service" />
<EventID Qualifiers="49152">128</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-04-10T02:10:43.000000000Z" />
<EventRecordID>9476</EventRecordID>
<Channel>Application</Channel>
<Computer>JimsAwesomePC</Computer>
<Security />
</System>
<EventData>
</EventData>
</Event> |
|
| Back to top |
|
 |
species8472jj
Joined: 26 Jan 2010 Posts: 23
|
Posted: Wed Apr 18, 2012 3:58 am Post subject: |
|
|
I installed the latest pytivo.
Unfortunately, when I reboot the machine, the pytivo service will not start. When I go in to start the pytivo service, it will not work (exact same issues happening which are mentioned above).
This is the error I still get from the application event log.
Could not locate the module name in the Python class string (ie, no '.')
I am not sure what this means. Should I do a clean install of pytivo? Should I re-install python?
Any help is appreciated. Thank you. |
|
| Back to top |
|
 |
|