TiVo Community Forum banner
1001 - 1020 of 2629 Posts

·
Registered
Joined
·
777 Posts
@Dan203

So I wiped it all out reinstalled it all removed firewall refs and stopped pytivo running as a windows service. All my file shares are working and oddly no more of that error...that said it couldn't find pytivo retry... so I wonder if that's all that any need to do. At any rate all my file shares show up and things are running nifty.. My computer is a gigabyte brix system (GB-BSI3H-6100-ZA-IWUS (rev. 1.0) | Mini-PC System (BRIX) | GIGABYTE) with 240gb ssd hdd and 120GB M.2 SSD. 8gb ram running windows 10pro 64bit. Boot time 17 secs to usable. Small system the size of my palm. Running things perfectly now! My shares are attached network storage btw and transfer seems fine albeit not as fast as I would like as the system is connected wirelessly
 

·
Premium Member
Joined
·
443 Posts
So it displays the file in the list OK it just fails when you attempt to pull it?
Correct, pyTivo displays the show, although with a rectangle in place of the odd character, but when I try to select it, nothing happens.

@Dan203 - Test it on your system. Include the odd character in a file name, try to pull and see what happens.
Hmmm.. I know some files display with tivo desktop and they don't get pulled because they are in incompatible video formats when they were encoded. I wonder if this is more the issue here rather than pytivo choking.
Nope, file pulled correctly after renaming.
 

·
Super Moderator
Joined
·
59,892 Posts
Discussion Starter · #1,006 ·
The TiVo in my office is not currently working so it makes it hard to test these things. I have to make code changes, then run down stairs to start a pull, then run back up stairs to check results. Really annoying. Trying to figure out an alternative I can use for development until I get it back up and running.
 

·
Registered
Joined
·
777 Posts
Glad you got it working. Not sure why it didn't work the first time.
Not sure why either. I think it might be because of running pytivo as a service.. however every computer is different from each other via hardware or software specifics.. I'll settle for that it's working. Now if there was away to clone my cable companies hdd from their tivo life would be great..
 

·
Super Moderator
Joined
·
59,892 Posts
Discussion Starter · #1,008 ·
Correct, pyTivo displays the show, although with a rectangle in place of the odd character, but when I try to select it, nothing happens.

@Dan203 - Test it on your system. Include the odd character in a file name, try to pull and see what happens.

Nope, file pulled correctly after renaming.
Well I see a couple of problems here... first off, on windows, ffmpeg refuses to even open a file with that name so it's failing at that point. On Mac it seems to get past that part, but the TiVo only supports ascii characters so it's failing to call the proper URL.

The second issue I could fix because the URL we're sending to TiVo is fake anyway. I could use a mapping of some sort of map a compatible URL to the actual file rather then trying to embed the entire path into the URL like they're doing now.

However the first problem I'm not sure how to fix. I've tried various ways to encode the file path for ffmpeg but I can't get it to open with unicode characters in the name. I'm going to try a few more things, but if ffmpeg can't open the file then it's impossible to get working.
 

·
Super Moderator
Joined
·
59,892 Posts
Discussion Starter · #1,009 ·
I'm looking around online and I don't think this is fixable. It seems that the function used to call ffmpeg, subprocess.Popen, does not support unicode characters on Windows in python 2.7. There is a conversion routine that can convert some, but not all, unicode characters to a format it does support but on this particular file that conversion is failing.

Short of converting the entire pyTivo project over to python 3.0, which would be a MAJOR project, there isn't anything I can do here.
 

·
Registered
Joined
·
777 Posts
I'm looking around online and I don't think this is fixable. It seems that the function used to call ffmpeg, subprocess.Popen, does not support unicode characters on Windows in python 2.7. There is a conversion routine that can convert some, but not all, unicode characters to a format it does support but on this particular file that conversion is failing.

Short of converting the entire pyTivo project over to python 3.0, which would be a MAJOR project, there isn't anything I can do here.
At some point it's gonna have to be converted.. for those characters seems to me it's not a major problem to manually change the characters. So I don't think it's a major urgency.
 

·
Super Moderator
Joined
·
59,892 Posts
Discussion Starter · #1,011 ·
I was considering physically renaming the file but there is another potential issue. If the folders the file is in also contain unicode characters then that would also be a problem. I can't start renaming folders too.

What I can do.... I can add better error handling so that the file doesn't even appear in the list and some sort of error is printed to the log explaining why.
 

·
Cranky old novice
Joined
·
9,481 Posts
I have no idea what language MG3 is written, but the problem of converting unicode to UTF-8 has been solved in most if not all. In python, there is a nice discussion and solution here: Converting Unicode Strings to 8-bit Strings
............
.......... There is a conversion routine that can convert some, but not all, unicode characters to a format it does support but on this particular file that conversion is failing.
..............
Dan,
I'm curious which function in Python 2.7 you are talking about, and what the "format it does support" is?

I played with the encode() function in 2.7 after reading the link posted by @minimeh, and if you are encoding to ASCII your choices are:
1. Remove the non-ascii characters.
or
2. Replace them by '?'
or
3. Throw an exception

Which function does a reasonable replacement for at least some characters, as you describe?
 

·
Registered
Joined
·
325 Posts
Short of converting the entire pyTivo project over to python 3.0, which would be a MAJOR project, there isn't anything I can do here.
Dan I've been holding off saying anything because it's not 100% done and I've only tested on linux, but I've converted pytivo to Python 3 in my github fork of pytivo.

I'm a little laid up right now (tore my quad tendon and am recuperating from surgery) or I'd give it a quick try in windows (I don't do Mac so can't test there at all).

You can see everything I've done (I tried to make my git commit messages relevent to the changes therein). My master branch now requires Python 3 (>=3.5 actually I think).

github.com/mlippert/pytivo

I am considering changing the repo name to py3tivo in the future, but thought I'd just let people know it's there for now.

The readme contains all the old readme info so is probably a little out of date, although it also does have new info about what I was doing with python 3 and what's needed to get it running such as installing needed packages using:
Code:
pip install -r requirements.txt
[/QUOTE]
 

·
Registered
Joined
·
325 Posts
Interesting. I have a lot of custom changes in my build that I'm not 100% sure are python 3 compatible. Especially the tray app. Not sure I'd want to do this even with all your extra work applied.
Yeah, I understand and that makes sense. I just wanted to let you know that the old pytivo and some of your changes had been converted to Python 3. I also did some work making some of the multi-threaded download code more threadsafe, although there are still some places at risk.

While I have converted over some of your changes, I didn't bother with the tray app parts because I was focused first on getting it running on linux, and also I didn't have the other half of the code the tray app parts communicate with.

So you are correct that getting all of your pytivo code converted to Python 3 (even merging into what I've got) would still be a large task. I would expect everything to be able to be made to work in Python 3 though. If you are thinking you want to try this and would like my help, just let me know.

I decided to learn Python by digging into pytivo and felt that Python 3 was at this point in time better to learn than Python 2, so converting pytivo was my first task.
 

·
Super Moderator
Joined
·
59,892 Posts
Discussion Starter · #1,017 ·
The only python I've ever done is pyTivo, so I'm not even sure what's different about python 3. I just know that the original pyTivo doesn't work with it. Maybe it wouldn't be a big task to convert. I'd have to try.
 

·
Registered
Joined
·
38 Posts
After installing pyTivo Desktop I received the following message:

"Error connecting to pyTivo!
Verify pyTivo is running and retry"

After reading messages, I opened pyTivo.exe in a command window.

the first line is: "WARNING: pyTivo.conf does not exist."

Any ideas on what to try next?
 
1001 - 1020 of 2629 Posts
Top