pyTivo Discussion Forum Forum Index pyTivo Discussion Forum
Answers and the development of pyTivo a TiVo transcoding server
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Issues with pyTivo Service

 
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> Support
 View previous topic :: View next topic  
Author Message
species8472jj



Joined: 26 Jan 2010
Posts: 23

PostPosted: Tue Apr 03, 2012 1:51 am    Post subject: Issues with pyTivo Service Reply with quote

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
View user's profile Send private message
wmcbrine



Joined: 04 Jan 2008
Posts: 2009
Location: Maryland

PostPosted: Tue Apr 03, 2012 2:12 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
lucasnz



Joined: 13 Sep 2010
Posts: 251

PostPosted: Tue Apr 03, 2012 10:52 am    Post subject: Reply with quote

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
View user's profile Send private message
philhu



Joined: 04 Jan 2008
Posts: 474

PostPosted: Tue Apr 03, 2012 1:05 pm    Post subject: Reply with quote

lucasnz wrote:


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.


<Funny Rant on>

Beta creep - Products that stay in Beta forever, so developers can blame bugs on it being beta. Smile

Comeon man! Let's step up to the plate!

<Funny Rant Off>
Back to top
View user's profile Send private message
wmcbrine



Joined: 04 Jan 2008
Posts: 2009
Location: Maryland

PostPosted: Tue Apr 03, 2012 4:04 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
reneg



Joined: 04 Jan 2008
Posts: 160

PostPosted: Tue Apr 03, 2012 8:02 pm    Post subject: Reply with quote

wmcbrine wrote:
lucasnz wrote:
You need to get the pyTivoService.exe and ini files

Where does pyTivoService.exe come from, originally? Where is the source code?


From http://pytivo.sourceforge.net/forum/windows-installer-infected-with-malware-t137.html ,
"I can assure you it isn't a virus or malware. pyTivoService.exe is simply xyntservice.exe from codeproject.com."
Back to top
View user's profile Send private message
lucasnz



Joined: 13 Sep 2010
Posts: 251

PostPosted: Tue Apr 03, 2012 8:56 pm    Post subject: Reply with quote

@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
View user's profile Send private message
species8472jj



Joined: 26 Jan 2010
Posts: 23

PostPosted: Sun Apr 08, 2012 4:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
wmcbrine



Joined: 04 Jan 2008
Posts: 2009
Location: Maryland

PostPosted: Sun Apr 08, 2012 5:31 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
species8472jj



Joined: 26 Jan 2010
Posts: 23

PostPosted: Sun Apr 08, 2012 11:17 pm    Post subject: Event Log Reply with quote

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
View user's profile Send private message
wmcbrine



Joined: 04 Jan 2008
Posts: 2009
Location: Maryland

PostPosted: Mon Apr 09, 2012 2:51 am    Post subject: Re: Event Log Reply with quote

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
View user's profile Send private message Visit poster's website
species8472jj



Joined: 26 Jan 2010
Posts: 23

PostPosted: Tue Apr 10, 2012 2:12 am    Post subject: Reply with quote

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
View user's profile Send private message
species8472jj



Joined: 26 Jan 2010
Posts: 23

PostPosted: Wed Apr 18, 2012 3:58 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> Support 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
You cannot attach files in this forum
You can download files in this forum
Site is in NO WAY affiliated with TiVo Inc

Powered by phpBB © 2001, 2005 phpBB Group
phpBB SEO

Get pytivo at SourceForge.net. Fast, secure and Free Open Source software downloads
[ Time: 0.1252s ][ Queries: 12 (0.0148s) ][ GZIP on - Debug on ]