Posts: 15,263
Joined: Jan 2009
Reputation:
727
ronie
Team-Kodi Member
Posts: 15,263
'/zap2epg.log' means it's at the root of the filesystem.
pretty sure that is read-only.
Posts: 290
Joined: Jun 2017
Reputation:
2
RKCRLR
Senior Member
Posts: 290
2018-06-23, 21:09
(This post was last modified: 2018-06-23, 21:24 by RKCRLR.)
It is in the Android/data/org.xbmc.kodi/files/.kodi/userdata/addon_data/script.module.zap2epg folder. I can make changes to it using both Windows Explorer and X-plore.
It seems like that means it is not read-only. Am I missing something?
I did notice that it is in the userdata folder vs the addons folder for the zap2epg.py file.
Thanks
Posts: 15,263
Joined: Jan 2009
Reputation:
727
ronie
Team-Kodi Member
Posts: 15,263
as far as i can tell from your log, the addon is trying to log data to /zap2epg.log, but it does not have permissions to write in that location.
it should log to /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata/addon_data/script.module.zap2epg/zap2epg.log instead.
most likely a bug in the addon i guess.
Posts: 290
Joined: Jun 2017
Reputation:
2
RKCRLR
Senior Member
Posts: 290
It is probably because I'm trying to run it directly from the zap2epg.py script using The Scheduler instead of running it in Kodi the way it was designed. If I run it manually in Kodi it works fine.
Maybe I'm taking the wrong approach. Let me ask this a different way.
I run this by going to Add-ons, Program add-ons, zap2epg, and then selecting "Run zap2epg and Update Guide Data" (the first item below the up one folder).
Is there an easy way to automate this process to run at 5am every day?
Thanks for your help!
Posts: 290
Joined: Jun 2017
Reputation:
2
RKCRLR
Senior Member
Posts: 290
Running scripts in Kodi from The Scheduler seems to work for other people but maybe they're not running Android.
I guess I need to come up with another plan...
Thanks
Posts: 290
Joined: Jun 2017
Reputation:
2
RKCRLR
Senior Member
Posts: 290
I thought I'd poke at this a little further.
I know manually running zap2epg works OK. So if I can replicate what I do manually using Kodi built-in functions it should work.
If I use the RunAddon function it opens zap2epg and gets me to the menu that has the option "Run zap2epg and Update Guide Data". But it appears the RunAddon function does not allow the use of arguments. However, the RunScript function does allow the use of arguments and can also invoke an addon by it's ID.
But now I need to know the correct argument for "Run zap2epg and Update Guide Data". The default.py file has:
'label': 'Run zap2epg and Update Guide Data',
'path': plugin.url_for(u'run'),
'thumbnail':get_icon_path('run'),
I've tried RunScript(script.module.zap2epg, run) but it gives:
Error Type: <type 'exceptions.IndexError'>
Error Contents: list index out of range
Do I have the right argument?
If not, how do I find out the correct argument?
Thanks
Posts: 290
Joined: Jun 2017
Reputation:
2
RKCRLR
Senior Member
Posts: 290
2018-06-24, 23:21
(This post was last modified: 2018-06-28, 02:50 by RKCRLR.)
Well, proving the adages a little knowledge can be dangerous, to a hammer everything looks like a nail, even a blind squirrel finds an acorn every once in a while, etc, I think I've come up with a crude, inelegant, temporary solution that is within my skill level (and it only took me a few hours).
I installed the Kodi Cron addon (it can schedule in small increments) and I made 4 schedule jobs:
RunAddon(script.module.zap2epg)
Action(PageUp)
Action(Down)
Action(Select)
They are scheduled to run a minute apart. They worked in a trial run. I'll see if they work tomorrow morning starting at 5 am after the Shield has gone to sleep.
If anyone has a more elegant solution I'm all ears. One concern I have is things getting out of wack and selecting something dangerous.
Thanks
Posts: 290
Joined: Jun 2017
Reputation:
2
RKCRLR
Senior Member
Posts: 290
Well, this seems to be working but I'm open to a less crude method.