Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After download the file epg.dat isn't updated #11

Open
IAmATeaf opened this issue Mar 24, 2012 · 8 comments
Open

After download the file epg.dat isn't updated #11

IAmATeaf opened this issue Mar 24, 2012 · 8 comments

Comments

@IAmATeaf
Copy link
Contributor

Don't have this issue myself but a few people have reported that after an overnight download the main EPG cache file epg.dat still has the previous days date and time stamp so hasn't been updated with the latest download.

@IAmATeaf
Copy link
Contributor Author

IAmATeaf commented Apr 4, 2012

I've now seen the issue myself. Looking through the log file all seems OK but the file epg.dat is dated from the day before whereas the copy of the file in /media/usb has todays date on it.

Is this area dead as nobody seems to be replying or updating? If it is then I'll stop wasting my time logging and updating?

@skaman
Copy link
Member

skaman commented Apr 21, 2012

Sorry, sometime i don't take care of crossepg for long times. If your still interested to investigate on it i'm here now.

@IAmATeaf
Copy link
Contributor Author

IAmATeaf commented May 2, 2012

I've investigated this issue and it seems that it's a similar problem to the other problem I had a look at where CrossEPG would revert to internal flash. The file crossepg_loader.py has the code in the loadEPG and loadEDG subs, :

    os.system(cmd)

so it looks like this command is just randomly failing. So I've replaced the call with:

    subprocess.call(cmd, shell=True)

I've also added the following line to the top of the file:

import subprocess

and have installed the subprocess module using the command:

opkg install python-subprocess

I'm testing it at the moment and for me personally it's been 100% working but a few others who are also testing it, the subprocess call green screens with an cannot allocate memory error as below:

[CrossEPG_Loader] /usr/crossepg/crossepg_epgcopy /media/usb/crossepg/ext.epg.dat /media/usb/epg.dat
Traceback (most recent call last):
File "/usr/lib/enigma2/python/Plugins/SystemPlugins/CrossEPG/crossepg_loader.py", line 153, in loadEPG
    subprocess.call(cmd, shell=True)
File "/usr/lib/python2.6/subprocess.py", line 470, in call
File "/usr/lib/python2.6/subprocess.py", line 623, in __init__
File "/usr/lib/python2.6/subprocess.py", line 1051, in _execute_child
OSError: [Errno 12] Cannot allocate memory
(PyObject_CallObject(<bound method CrossEPG_Loader.loadEPG of <class 'Plugins.SystemPlugins.CrossEPG.crossepg_loader.CrossEPG_Loader'>>,()) failed)

@IAmATeaf
Copy link
Contributor Author

IAmATeaf commented May 3, 2012

I've also noticed the use of os.system calls in the file crossepg_auto.py and have modified it as below:

    if fileExists("/tmp/crossepg.standby"):
        # Modded by IAmATeaf 07/04/2012
        # os.system("rm -f /tmp/crossepg.standby")
        os.unlink("/tmp/crossepg.standby")
        print "[CrossEPG_Auto] coming back in standby in 30 seconds"
        self.standbyTimer.start(30000, 1)

In the code above does it really need to do an rm -f when looking through the rest of the code it only ever creates crossepg.standby as a file?

                if inStandby:
                    # Modded by IAmATeaf 07/04/2012
                    # os.system("touch /tmp/crossepg.standby")
                    open("/tmp/crossepg.standby", "wb").close()
                else:
                    # Modded by IAmATeaf 07/04/2012
                    # os.system("rm /tmp/crossepg.standby")
                    os.unlink("/tmp/crossepg.standby")

I've created a fork of the code and have upload the changed files but I don't know how you'd merge it back so that you are aware and either accept or reject the changes?

@skaman
Copy link
Member

skaman commented May 6, 2012

Hi... about users with error "OSError: [Errno 12] Cannot allocate memory" there's few things to do. The only way to really solve it's enabled a swap device (but it's a responsibility of the user).

The other fixes seem ok... use open and os.unlink instead of system is really better.

If you have forked it you should do a "pull request". It's a really useful feature of github (like explained here http://help.github.com/send-pull-requests/)

@IAmATeaf
Copy link
Contributor Author

IAmATeaf commented Jun 1, 2012

Hi Skaman, Even subprocess has the same problem. I've also added a 16mb swap file but still get the problem after around a week or so. I'm currently looking at using eConsoleAppContainer instead. I've revised the code to use eConsoleAppContainer and am testing at the moment.

@IAmATeaf
Copy link
Contributor Author

IAmATeaf commented Jun 2, 2012

The revised code worked overnight so I can confirm that it works both interactively, when run from the GUI and when run from the timer overnight so is looking good.

With the 16mb swap I noticed that the previous subprocess method would fail after around 2 weeks so am going to keep on testing and will report back with the revised code in 2+ weeks time assuming I don't get any failures.

@IAmATeaf
Copy link
Contributor Author

I've updated the file crossepg_loader.py, replaced the os.system calls in the subs loadEPG and loadEDG to now use the enigma2 eConsoleAppContainer callback function. This revised code for me has work faultlessly for the last 2 weeks with no failures.

tension9000 pushed a commit to tension9000/e2openplugin-CrossEPG that referenced this issue Jan 23, 2019
[translations] CrossEPG it.po italian language translation - initial …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants