Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. QNetworkReply objects getting mixed up with other objects in PySide ?
Forum Updated to NodeBB v4.3 + New Features

QNetworkReply objects getting mixed up with other objects in PySide ?

Scheduled Pinned Locked Moved Language Bindings
2 Posts 1 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shevron
    wrote on last edited by
    #1

    I hope this question belongs here and not in one of the other forums or in the BTS - I am seeing a very strange (and very intermittent) issue, where in places where I expect to get other QObject types, I get a QNetworkReply object in PySide 1.1 / Qt 4.7.4 on Ubuntu 11.10.

    I know this sounds strange, but this is the type of errors I see:

    @AttributeError: 'PySide.QtNetwork.QNetworkReply' object has no attribute 'userAgentForUrl'@
    @QMetaObject::invokeMethod: No such method QNetworkReply::repaintRequested(QRect)@
    @Object::connect: No such signal QNetworkReply::loadProgress(int)@
    @Object::connect: No such signal QNetworkReply::unsupportedContent(QNetworkReply*)@

    The errors are not always consistent, but it is always QNetworkReply and QWebPage that are being mixed up in my case. The problem is very intermittent - I am yet unable to get a clear reproduction flow for it.

    Some of these trace to my own code, and some trace to internal Qt operations - but in all of these I expect a QWebPage object and not a QNetworkReply object. In fact the trace to the first error above (AttributeError: 'PySide.QtNetwork.QNetworkReply' object has no attribute 'userAgentForUrl') traces back to something like:

    @ File "/usr/lib/pymodules/python2.7/xxxxx/webpage.py", line 298, in load
    self.mainFrame().load(netRequest, REQUEST_METHOD_MAP[self._request.method])
    AttributeError: 'PySide.QtNetwork.QNetworkReply' object has no attribute 'userAgentForUrl'
    @

    Where 'self' in this case points to an object of QWebPage type (I inherit QWebPage to override some of its methods).

    I have tried searching for this issue and even asked in the PySide IRC channel, but got no response except for a similar report from another user who also told me he got no response.

    Did anyone encounter this, or can speculate if this is a bug in PySide / Qt, or I'm doing something terribly wrong? How can I further debug this?

    Thanks,

    Shahar.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      shevron
      wrote on last edited by
      #2

      For what is worth this issue seems to be solved after upgrading to PySide 1.2.1.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved