twisted web problem

  • Hi everybody


    hi found this on enigma2 log


    Code
    /usr/lib/python2.6/site-packages/twisted/internet/_sslverify.py:5: DeprecationWarning: the md5 module is deprecated; use hashlib instead
      import itertools, md5


    Now the plugins:
    genuinedreambox, remains on (Step 1) permanantely
    MyTube, dont show any preview image
    Software Manager->Manage Extension, on plugins detail screen the preview image dont'appaer.


    It seem the problem is a function getPage on twisted.web.client don't return the web request results, but any message is write on log


    Any Idea?


    image is compiled using enigma2 experimental head. and openembedded opendreambox.-1.6 head


    Thank's

  • This is a WARNING not an error. And in fact it is no Problem at all.
    The problem is something different, maybe some broken plugin that exectues reactor.run() (which would cause the described effect)!


    Thanks, for answer.


    But it very strange, because i installed only a official plugins.
    I'm sure until 21.12.2010 all work ok. and seem that the problem appear only with the plugins on gti enigma2-plugins repo.

    • Offizieller Beitrag

    Well, this Warning only tells that the webinterface is using a deprecated module.
    I will fix the warning this weekend (because that's something I planned to do anyways) but it will definitley not fix your problem...


    Maybe a short explanation of what is most probably going on from a technical point of view:


    When using twisted.web, which is an event-based web framework, things usually go the following way:


    You connect to something, this could also happen with nice-to-use functions like "getPage"
    You define a "callback" and/or errorback (a method that will be called after a certain "Event" has been raised in e.g. getPage).
    When "getPage" is done it will either call the registered callback methods, or the errorback method if anything's gone wrong.


    Now the only reason i know causing callbacks to never ever be called is when someone does a "reactor.run()" in his plugin.
    The problem is, that enigma2 has it's own reactor, so if you call reactor.start() from inside a plugin you essiantly mess up the whole thing ;).
    No single thing that's based on deferreds works anymore, things just "dissapear in a black hole".


    So my suggestion would be: remove one plugin after another until it works again. When it does work again it would be great if you could drop us a note in this thread about the plugin that's causing the issues.



    And just to be safe: Another possbile reason could be, that enigma2 is broken at that place... but as i just updated my e2 yesterday and did not stumble accross that issue, i assume it's not.

  • Thanks,
    I found the plugin, is SoftwareManager


    I removed tasks-opendreambox-enigma2 for dep and SoftwarManager and now getPage() works and genuinedreambox work fine.
    It is very strange, because there are no recent mod, for this plugin, on enigma2 experimental repo....

    2 Mal editiert, zuletzt von Gianathem ()

  • The problem is on this line


    Python
    from twisted.web import client


    if i comment the line above, and mod this


    Code
    if thumbnailUrl is not None:
    			self.thumbnail = "/tmp/" + thumbnailUrl.split('/')[-1]
    			print "[PluginDetails] downloading screenshot " + thumbnailUrl + " to " + self.thumbnail
    			#if iSoftwareTools.NetworkConnectionAvailable:
    				##downloadPage(thumbnailUrl,self.thumbnail).addCallback(self.setThumbnail).addErrback(self.fetchFailed)
    			#else:
    			self.setThumbnail(noScreenshot = True)
    		else:
    			self.setThumbnail(noScreenshot = True)


    everithing work, but is not posslble to download preview image

    Einmal editiert, zuletzt von Gianathem ()