XMLTV / xmltv

Utilities to obtain, generate, and post-process TV listings data in XMLTV format
GNU General Public License v2.0
275 stars 93 forks source link

tv_grab_uk_tvguide fails to resolve path to conf file #131

Closed thedave42 closed 3 years ago

thedave42 commented 3 years ago

Thanks for taking the time to report an issue. Please take a moment to review our open/closed issues above, in case your issue has already been reported.

If you are reporting a new issue, please give your issue a descriptive title and fill out the blanks below, providing as much information as possible.

XMLTV Version?

Compiled from master on Feb 11th 2021 @ 12:36 PST

XMLTV Component?

tv_grab_uk_tvguide

What happened?

Received error message: XMLTV::Supplement: Failed to read from C_\Users\dave\AppData\Local\xmltv\supplement\tv_grab_uk_tvguide\tv_grab_uk_tvguide.map.conf.

What did you expect to happen?

The download to start šŸ˜ƒ

Did you see any warnings/errors?

ā˜ļø

What steps are needed to reproduce this issue?

  1. Be on Windows šŸ˜ƒ
  2. tv_grab_uk_tvguide.bat --config-file skyspf1.conf --configure
  3. tv_grab_uk_tvguide.bat --config-file skyspf1.conf --days 7 --output data.xml --debug

Any other information?

This seems to be an issue with how Windows handles paths. I'm not sure if this would be an issue in *nix environment. I fixed the issue by by removing the regexp that replaced semi colons with underscores in the path in lib/Supplement.pm.in

https://github.com/thedave42/xmltv/commit/c148d95e4816be20ee228c467cd4c60598416a85

Happy to do a pull request for this fix.

What other software are you using?

Windows 10 Pro Build 19041.685

Strawberry Perl version 32, subversion 1 (v5.32.1) built for MSWin32-x64-multi-thread

thedave42 commented 3 years ago

FYI, I get the same error when I use the new Windows binary.

mkbloke commented 3 years ago

Try creating an empty map config with the path and filename as specified in the error message. I noticed I had to do that under Linux with this grabber. I would consider it a minor bug that tv_grab_uk_tvguide doesn't carry on when this file doesn't exist, although it's not something I've bothered to raise as an issue.

rmeden commented 3 years ago

Does supplement store in the "share" directory?Ā  Maybe try forward slashes?

On 2/11/2021 3:59 PM, Ian Cameron wrote:

Try creating an empty map config with the path and filename as specified in the error message. I noticed I had to do that under Linux with this grabber. I would consider it a minor bug that tv_grab_uk_tvguide doesn't carry on when this file doesn't exist, although it's not something I've bothered to raise as an issue.

ā€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/XMLTV/xmltv/issues/131#issuecomment-777820190, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBCLNQOZILOD3YXMSBSLZ3S6RHL3ANCNFSM4XPRRPXA.

thedave42 commented 3 years ago

I think the problem is more todo with how Windows represents the disk in its path by including a drive letter and colon, which wouldn't be present on *nix of OSX. I'm pretty sure this has to do with replacing the colon in C: with C_ and then trying to use that as the lookup path. To make this a valid path in windows, I would need to create a folder in my root called C_ and then manually add the file there. I haven't dug too deep, but maybe I'll take a look at how the paths are handled with the cache files because those seem to be working fine.

honir commented 3 years ago

@thedave42 Thanks for the report...and the fix! :)

Fix for Windoze paths in Supplement.pm committed : b00e9c9

Change tv_grab_uk_tvguide to get default supplement file if missing locally : 0b9e776

honir commented 3 years ago

I meant to say also, don't forget you can set the path for the supplement files by setting the Windows environment variable XMLTV_SUPPLEMENT (using either 'set' or 'setx')

Setting XMLTV_SUPPLEMENT_VERBOSE=1 may also help you locate things.