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 

pyTivo windows installer beta v0.3

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



Joined: 13 Sep 2010
Posts: 323

PostPosted: Mon Dec 05, 2011 8:49 am    Post subject: pyTivo windows installer beta v0.3 Reply with quote

Update 12 Apr 2012: Fixed bug returning hashtable under some circumstances.

Update 21 Mar 2012: I've identified a number of bugs with the installer and fixed them. It should work much better now.

I've been working on a installation script for pyTivo for a while.

It does the following things;
* find python install (currently only looks in c:\ for python2*\python.exe) - anyone know I better way of identifying the python installation dir?
* identifies the latest version of my pyTivo branch and dvd plugin and downloads them
* downloads ffmpeg and tivodecode
* if the user has an existing install (in %program files%\pyTivo) it will ask you if you want to retain your old pyTivo.conf - I think this is ok since if you previously had pyTivo installed somewhere else it won't get overwritten
* install all downloaded files and set up pyTivo.conf for the user
* sets up pyTivo as a windows service
* a bunch of other bits and pieces

To install pyTivo double click pyTivo_install.cmd to launch the installer

To uninstall pyTivo double click pyTivo_uninstall.cmd

Note the installation script is written in PowerShell. I choose this scripting language because PowerShell is installed on Windows 7 machines by default and I can run a command to elevate the permissions (using User Account Control) so it will work for people that have UAC enabled.

It'd be cool if some poeple could give it a go and let me know if it works...



pyTivo_install.v0.3.zip
 Description:

Download
 Filename:  pyTivo_install.v0.3.zip
 Filesize:  43.03 KB
 Downloaded:  257 Time(s)



Last edited by lucasnz on Wed Apr 11, 2012 12:39 pm; edited 3 times in total
Back to top
View user's profile Send private message
philhu



Joined: 04 Jan 2008
Posts: 620

PostPosted: Mon Dec 05, 2011 1:58 pm    Post subject: Reply with quote

Ok, I have pyTivo for years, but am running as a 'newbie' to see what can go wrong. First off, if it does not find Python, it says so and fails. Maybe point user to where to get install kit? Or maybe download python and install it too?

What version python is needed these days, 2.6? 2.7 work?

Ok, it fails at the very end, with some red code, that goes away too fast to save it.

Then the service will not start with a 'file not found' error
Back to top
View user's profile Send private message
lucasnz



Joined: 13 Sep 2010
Posts: 323

PostPosted: Mon Dec 05, 2011 7:39 pm    Post subject: Reply with quote

Firstly, thanks for testing it. What OS are you running it on?

In terms of the python question, it looks for python.exe in c:\python2* folder. Yes, I need to update this so that if it doesn't find it, it prompts the user for the location.

Did you manage to get it past the can't find python screen? how did you do that?

It is supposed to stop and display any errors. Given that it's actually quiting the script, this implies that the code is actually not valid PowerShell code somewhere. Can you do the following so that I can see the error:
Start a command prompt with elevated permissions (start type cmd.exe, right click run as adminsitrator), in the command prompt type the following;
powershell -executionpolicy unrestricted
cd "\folder that contains install script"
.\pyTivo_install.ps1

Cheers,

Luke
Back to top
View user's profile Send private message
lucasnz



Joined: 13 Sep 2010
Posts: 323

PostPosted: Wed Mar 21, 2012 10:37 am    Post subject: Reply with quote

I found several bugs in 0.1 of the installer script some I've released 0.2. This should be much more stable. I'm interested to get peoples feedback on this.
Back to top
View user's profile Send private message
b134



Joined: 04 Apr 2012
Posts: 1

PostPosted: Wed Apr 04, 2012 2:09 pm    Post subject: Reply with quote

Hello I tried your program, all things considered I am a noob to these programs (pytivo, python). I do not have any issues on doing code, just having issues getting these programs to get started I was able to download them ok and I am pretty sure I am using the correct versions (Python version 2.7.2, wmcbrine-pytivo-d763c8d). I extract them to c directory (C:\pytivo, and C:\python), but right after that it gets sketchy. I copy and paste pyTivo.conf.dist to desktop and rename as pytivo.conf, but when I try to edit parameters it opens with notepad. I see no way to edit the path for ffmpeg.exe as suggested in the windows installation posts. I then try to open that pytivo.conf with python it opens a command window for about 1 second then that window disappears.
So I was reading the forums on how to install in windows and came across your installer figured I would give it a go. I have windows 7 64bit. Here is a copy of the log file.
04/04/2012, 08:15:07
C:\Users\BERGER\AppData\Local\Temp\Rar$EX21.016\pyTivo_install\pyTivoService.exe
04/04/2012, 08:15:07
C:\Users\BERGER\AppData\Local\Temp\Rar$EX21.016\pyTivo_install\pyTivoService.ini
04/04/2012, 08:15:07
C:\Users\BERGER\AppData\Local\Temp\Rar$EX21.016\pyTivo_install\pyTivoService.log
04/04/2012, 08:15:07
pyTivo
04/04/2012, 08:15:07
StartServiceCtrlDispatcher failed, error code = 1063
Back to top
View user's profile Send private message
lucasnz



Joined: 13 Sep 2010
Posts: 323

PostPosted: Wed Apr 04, 2012 8:24 pm    Post subject: Reply with quote

Hi b134,

I don't understand where's you've got this log from. It doesn't look like log output from my windows installer. Is this the output from the old msi installer? My installer is not an msi. Where did you acquire the installer from?

Luke
Back to top
View user's profile Send private message
DjCalvin



Joined: 28 May 2010
Posts: 12
Location: Boston, MA

PostPosted: Mon Apr 09, 2012 1:08 am    Post subject: Reply with quote

Code:

Array assignment to [pyTivoSourceFile] failed: Cannot convert value "pyTivoSour
ceFile" to type "System.Int32". Error: "Input string was not in a correct forma
t.".
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:442 char:19
+         $settings[ <<<< "pyTivoSourceFile"] = $pyTivoSourceFile
    + CategoryInfo          : InvalidOperation: (C:\Users\ADMINI...\2\VoRWfMth
   .zip:PSObject) [], RuntimeException
    + FullyQualifiedErrorId : ArrayAssignmentFailed

Array assignment to [dvdvideoSourceFile] failed: Cannot convert value "dvdvideo
SourceFile" to type "System.Int32". Error: "Input string was not in a correct f
ormat.".
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:443 char:19
+         $settings[ <<<< "dvdvideoSourceFile"] = $dvdvideoSourceFile
    + CategoryInfo          : InvalidOperation: (C:\Users\ADMINI...\2\cHumS09w
   .zip:PSObject) [], RuntimeException
    + FullyQualifiedErrorId : ArrayAssignmentFailed

Array assignment to [FFmpegFile] failed: Cannot convert value "FFmpegFile" to t
ype "System.Int32". Error: "Input string was not in a correct format.".
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:444 char:19
+         $settings[ <<<< "FFmpegFile"] = $FFmpegFile
    + CategoryInfo          : InvalidOperation: (C:\Users\ADMINI...\2\vBnQOZMf
   .zip:PSObject) [], RuntimeException
    + FullyQualifiedErrorId : ArrayAssignmentFailed

Array assignment to [tivodecodeFile] failed: Cannot convert value "tivodecodeFi
le" to type "System.Int32". Error: "Input string was not in a correct format.".
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:445 char:19
+         $settings[ <<<< "tivodecodeFile"] = $tivodecodeFile
    + CategoryInfo          : InvalidOperation: (C:\Users\ADMINI...\2\PKA8VXp3
   .zip:PSObject) [], RuntimeException
    + FullyQualifiedErrorId : ArrayAssignmentFailed

Index operation failed; the array index evaluated to null.
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:150 char:28
+         $value = $settings[ <<<< $key]
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArrayIndex

 :
Test-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:166 char:18
+     if (Test-Path <<<<  $pyTivopath) {
    + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingVa
   lidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M
   icrosoft.PowerShell.Commands.TestPathCommand



    Directory: C:\Users\ADMINI~1\AppData\Local\Temp\2


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----          4/8/2012   9:04 PM            L7RD6hNF
Installing pyTivo...
You cannot call a method on a null-valued expression.
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:184 char:42
+     $destination.Copyhere($zip_file.items <<<< (), 0x14)
    + CategoryInfo          : InvalidOperation: (items:String) [], RuntimeExce
   ption
    + FullyQualifiedErrorId : InvokeMethodOnNull

Move-Item : Cannot find path 'C:\Users\ADMINI~1\AppData\Local\Temp\2\L7RD6hNF\l
ucasnz' because it does not exist.
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:186 char:14
+     Move-Item <<<<  "$tempfolder\lucasnz" "$pyTivopath"
    + CategoryInfo          : ObjectNotFound: (C:\Users\ADMINI...7RD6hNF\lucas
   nz:String) [Move-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.MoveI
   temCommand

Copy-Item : Cannot copy item C:\Users\Administrator\Downloads\pyTivo_install.v0
.2\pyTivo_install\pyTivoService.exe onto itself.
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:190 char:14
+     Copy-Item <<<<  "$scriptPath\pyTivoService.*" "$pyTivopath"
    + CategoryInfo          : WriteError: (C:\Users\Admini...TivoService.exe:S
   tring) [Copy-Item], IOException
    + FullyQualifiedErrorId : CopyError,Microsoft.PowerShell.Commands.CopyItem
   Command

Copy-Item : Cannot copy item C:\Users\Administrator\Downloads\pyTivo_install.v0
.2\pyTivo_install\pyTivoService.ini onto itself.
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:190 char:14
+     Copy-Item <<<<  "$scriptPath\pyTivoService.*" "$pyTivopath"
    + CategoryInfo          : WriteError: (C:\Users\Admini...TivoService.ini:S
   tring) [Copy-Item], IOException
    + FullyQualifiedErrorId : CopyError,Microsoft.PowerShell.Commands.CopyItem
   Command

Installing dvdvideo plugin...
You cannot call a method on a null-valued expression.
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:202 char:42
+     $destination.Copyhere($zip_file.items <<<< (), 0x14)
    + CategoryInfo          : InvalidOperation: (items:String) [], RuntimeExce
   ption
    + FullyQualifiedErrorId : InvokeMethodOnNull

Move-Item : Cannot find path 'C:\plugins\pyTivo_dvdvideo' because it does not e
xist.
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:204 char:14
+     Move-Item <<<<  "$pyTivopath\plugins\pyTivo_dvdvideo" "$pyTivopath\plugin
s\dvdvideo"
    + CategoryInfo          : ObjectNotFound: (C:\plugins\pyTivo_dvdvideo:Stri
   ng) [Move-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.MoveI
   temCommand

Creating bin dir...


    Directory: C:\


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----          4/8/2012   9:04 PM            bin
Installing FFmpeg...
You cannot call a method on a null-valued expression.
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:217 char:42
+     $destination.Copyhere($zip_file.items <<<< (), 0x14)
    + CategoryInfo          : InvalidOperation: (items:String) [], RuntimeExce
   ption
    + FullyQualifiedErrorId : InvokeMethodOnNull

Installing tivodecode...
You cannot call a method on a null-valued expression.
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:223 char:42
+     $destination.Copyhere($zip_file.items <<<< (), 0x14)
    + CategoryInfo          : InvalidOperation: (items:String) [], RuntimeExce
   ption
    + FullyQualifiedErrorId : InvokeMethodOnNull

Move-Item : Cannot find path 'C:\bin\tivodecode' because it does not exist.
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:225 char:14
+     Move-Item <<<<  "$path\tivodecode\*.*" $path
    + CategoryInfo          : ObjectNotFound: (C:\bin\tivodecode:String) [Move
   -Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.MoveI
   temCommand

Remove-Item : Cannot find path 'C:\bin\tivodecode' because it does not exist.
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:226 char:16
+     Remove-Item <<<<  "$path\tivodecode"
    + CategoryInfo          : ObjectNotFound: (C:\bin\tivodecode:String) [Remo
   ve-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.Remov
   eItemCommand

Creating firewall rules...
Creating pyTivo service...

Status      : Stopped
Name        : pyTivo
DisplayName : pyTivo

Starting Service...
Start-Service : Service 'pyTivo (pyTivo)' cannot be started due to the followin
g error: Cannot start service pyTivo on computer '.'.
At C:\Users\Administrator\Downloads\pyTivo_install.v0.2\pyTivo_install\pyTivo_i
nstall.ps1:251 char:18
+     Start-Service <<<<  pyTivo
    + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceControl
   ler:ServiceController) [Start-Service], ServiceCommandException
    + FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Comman
   ds.StartServiceCommand

Cleaning up temporary files...
Press any key to continue ...

Back to top
View user's profile Send private message
lucasnz



Joined: 13 Sep 2010
Posts: 323

PostPosted: Mon Apr 09, 2012 8:34 am    Post subject: Reply with quote

Thanks, yeah, I was already aware of this issue. There seems to be an issue returning a hash table under some circumstances. I'm working on fixing this. If you run the script again and choose not to overwrite the conf file then it should work. Hopefully v0.3 should fix this (hopefully out soon)...

Luke
Back to top
View user's profile Send private message
lucasnz



Joined: 13 Sep 2010
Posts: 323

PostPosted: Wed Apr 11, 2012 12:48 pm    Post subject: Reply with quote

@DjCalvin

The bug you reported should be resolved now.
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 -> pyTivo 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.2078s ][ Queries: 14 (0.0144s) ][ GZIP on - Debug on ]