Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Page 10 of 12 FirstFirst ... 89101112 LastLast
Results 136 to 150 of 180

Thread: EPG Translator (Discussion thread)

  1. #136
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,797
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by abu baniaz View Post
    Just for reference, this is not translating on OpenPLI for me.
    Doesn't look good.
    I'm working on 2.02, which currently:

    • Overcomes the ~7500 byte limit on calls to Google translate (it splits, loops and stitches)
    • Uses paths relative to the plugin.py script for icons, rather than hard-wiring paths.
    • A few minor things.


    So I'll get the fix in there for this, assuming I can find the problem.

    EDIT: Difficult to see how a long could end up in any statement using + in that try clause (but I'm sure OpenPLi's enigma2 knows more than me about this).
    I'll need to see whether I can get more info displayed (such as the line number for the Exception).
    Last edited by birdman; 11-02-21 at 20:25.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  2. The Following User Says Thank You to birdman For This Useful Post:

    ja5 (11-02-21)

  3. #137
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,797
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Hi Abu,

    Could you drop this file in place and repeat, please? It will display the traceback for the Exception in the debug log.

    plugin.py

    At least the error was trapped and enigma2 kept running....
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  4. The Following User Says Thank You to birdman For This Useful Post:

    abu baniaz (12-02-21)

  5. #138
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,362
    Thanks
    6,443
    Thanked 9,160 Times in 6,235 Posts
    Thanks. Got this

    Code:
    [EPGTranslator-Plugin] translateEPG error: unsupported operand type(s) for +: 'long' and 'str'
    Traceback (most recent call last):
      File "/usr/lib/enigma2/python/Plugins/Extensions/EPGTranslator/plugin.py", line 633, in translateEPG
        to = int(self.event[epg_B] + self.event[epg_D] + 60*config.epg.histminutes.value)
    TypeError: unsupported operand type(s) for +: 'long' and 'str'

  6. The Following User Says Thank You to abu baniaz For This Useful Post:

    birdman (12-02-21)

  7. #139
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,797
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Not sure what it thinks is a str.

    I've assumed its the .value rather than .getValue() usage. Can you please check whether this one works?

    plugin.py

    I've also got it printing out the actual type of all three variables, just in case I'm wrong.
    So even if it works, could you post the line containing "epg_B"?
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  8. #140
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,362
    Thanks
    6,443
    Thanked 9,160 Times in 6,235 Posts
    That worked on PLI. Thanks.

    Code:
    epg_B: <type 'long'> epg_D: <type 'long'> hmval: <type 'str'> hmget: <type 'int'>

  9. #141
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,797
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by abu baniaz View Post
    That worked on PLI. Thanks.

    Code:
    epg_B: <type 'long'> epg_D: <type 'long'> hmval: <type 'str'> hmget: <type 'int'>
    Thanks. On Vix that third value is an int too.

    I'll add that in to the next release (should be ready this weekend).
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  10. #142
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,362
    Thanks
    6,443
    Thanked 9,160 Times in 6,235 Posts
    Also tried it on ViX and still works.

  11. #143
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,797
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Next release is here. 2.02-rc1

    This can handle "any" length of query to Google translate (by splitting it into pieces on a sentence boundary then putting it back together).
    It adds an option to show a one-level traceback in the debug log if there is a problem translating (so I don't need to send Abu a debug version if PLi has a problem again - which it shouldn't).

    There are also various internal code tidy-ups, simplifications and rationalizations.

    You'll find it in the download thread.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  12. The Following 4 Users Say Thank You to birdman For This Useful Post:

    abu baniaz (13-02-21),carpcat (14-02-21),ja5 (13-02-21),Willo3092 (13-02-21)

  13. #144
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,632
    Thanks
    2,007
    Thanked 4,956 Times in 3,276 Posts
    @Birdman, what is your plan for this? Is it open source? Can I add it to our plugins repo so we can build it from source rather than having a precompiled, third-party IPK?

    1.jpg

    2.jpg
    Last edited by Huevos; 15-02-21 at 17:38.
    Help keep OpenViX servers online.Please donate!

  14. #145
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,632
    Thanks
    2,007
    Thanked 4,956 Times in 3,276 Posts
    Code:
            except Exception as e:  # Use originals on a failure...
                print("[EPGTranslator-Plugin] translateEPG error:", e)
                if (CfgPlTr.showtrace,getValue()): traceback.print_exc()
                (t_title, t_descr) = (title, descr)
    This line here:
    Code:
    if (CfgPlTr.showtrace,getValue()): traceback.print_exc()
    You've got a comma in there.

    I also got this:
    Code:
    [EPGTranslator-Plugin] translateEPG error: need more than 1 value to unpack
    Last edited by Huevos; 15-02-21 at 18:00.
    Help keep OpenViX servers online.Please donate!

  15. #146
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,797
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by Huevos View Post
    Code:
            except Exception as e:  # Use originals on a failure...
                print("[EPGTranslator-Plugin] translateEPG error:", e)
                if (CfgPlTr.showtrace,getValue()): traceback.print_exc()
                (t_title, t_descr) = (title, descr)
    This line here:
    Code:
    if (CfgPlTr.showtrace,getValue()): traceback.print_exc()
    You've got a comma in there.
    !!!!????
    How did that get there???
    Fix along shortly....


    I also got this:
    Code:
    [EPGTranslator-Plugin] translateEPG error: need more than 1 value to unpack
    Which means it failed to translate - somehow. This is the message from a split() when what it is splitting on isn't there.
    I'm still used to Perl, which does the more friendly option of setting the empty bits to undef.
    But either way, it will have failed to translate and so have little or nothing to show.
    Last edited by birdman; 16-02-21 at 03:26.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  16. #147
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,797
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    2.02-rc2, with the type fixed is now in the download thread.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  17. #148
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,797
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by Huevos View Post
    @Birdman, what is your plan for this? Is it open source?
    Well, the original code came from a now defunct source. As far as I'm concerned all of my bits are open source.

    Can I add it to our plugins repo so we can build it from source rather than having a precompiled, third-party IPK?
    In theory, yes; but there isn't any method there at the moment to pre-compile it.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  18. #149
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,632
    Thanks
    2,007
    Thanked 4,956 Times in 3,276 Posts
    Quote Originally Posted by birdman View Post
    In theory, yes; but there isn't any method there at the moment to pre-compile it.
    Don't worry about that. I'll get that bit working.
    Help keep OpenViX servers online.Please donate!

  19. The Following 2 Users Say Thank You to Huevos For This Useful Post:

    Andy_Hazza (16-02-21),birdman (16-02-21)

  20. #150
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,632
    Thanks
    2,007
    Thanked 4,956 Times in 3,276 Posts
    I've added to oe-alliance-plugins.
    https://github.com/oe-alliance/oe-al.../EPGTranslator

    Should be in the Release build.

    One minor change, I have added button labels... doesn't affect the embedded skin.
    Help keep OpenViX servers online.Please donate!

  21. The Following User Says Thank You to Huevos For This Useful Post:


Page 10 of 12 FirstFirst ... 89101112 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.