Skip to content

AddonManager never goes further “Checking connection” #318

@StSav012

Description

@StSav012

Here reply is always None, rendering the function useless. That's a known peculiarity of PySide6.

reply: QtNetwork.QNetworkReply = self.sender()

As a workaround against that, I suggest changing

reply.finished.connect(self.__reply_finished)

to

        reply.finished.connect(lambda r=reply: self.__reply_finished(r))

and

def __reply_finished(self) -> None:
"""Called when a reply has been completed: this makes sure the data has been read and
any notifications have been called."""
reply: QtNetwork.QNetworkReply = self.sender()

to

     def __reply_finished(self, reply: QtNetwork.QNetworkReply | None = None) -> None:
         """Called when a reply has been completed: this makes sure the data has been read and
         any notifications have been called."""
         if reply is None:
             reply = self.sender()

to maintain the compatibility with calls I might've missed. I find the solution dirty, but it works.

There are many more places like this, even in the file. That's the reason I make the issue, not a PR.


FreeCAD Info:

OS: Manjaro Linux (KDE/plasma/wayland)
Architecture: x86_64
Version: 1.0.2.39319 (Git)
Build type: Release
Branch: makepkg
Hash: 256fc7eff3379911ab5daf88e10182c509aa8052
Python 3.13.7, Qt 6.10.1, Coin 4.0.5, Vtk 9.5.2, OCC 7.9.2
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: FreeCAD Dark.qss/FreeCAD Dark/
Installed mods:

  • CADExchanger
  • fasteners-backup-before-zip-migration 0.5.33 (Disabled) ← this proves the changes work well!
  • fasteners 0.5.43
  • pcb 6.2023.1
  • manifest.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions