<div dir="ltr">Hi everyone,<div><br><div>I actually managed to fix it after some more digging. The issue was that the multipart body of the request was garbage collected by Python before the request was sent. The fix is to set the parent of the QHttpMultiPart object to the associated QNetworkResponse before leaving the scope where the multipart object is defined. I thought this was not necessary as I'm not used to thinking about ownership when developing in Python.</div><div><br></div><div>A working example is attached for anyone that might run into similar problems in the future.</div><div><br></div><div>Have a great day,</div></div><div>Simon</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">st 1. 11. 2023 v 12:47 odesílatel <<a href="mailto:colin.mcphail@mac.com">colin.mcphail@mac.com</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi  Šimon,<br><div><br><blockquote type="cite"><div>On 31 Oct 2023, at 19:52, Šimon Leitgeb <<a href="mailto:leitgeb.simon@gmail.com" target="_blank">leitgeb.simon@gmail.com</a>> wrote:</div><br><div><span style="font-family:Futura-Medium;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">QHttpMultiPart<span> </span></span></div></blockquote></div><br><div>I can confirm that your test program crashes on my system:</div><div><div><br></div><div><font face="Courier New">         PyQt6 Version Information</font></div><div><font face="Courier New">╭───────────┬──────────────────────────────╮</font></div><div><font face="Courier New">│ Component │           Version            │</font></div><div><font face="Courier New">├───────────┼──────────────────────────────┤</font></div><div><font face="Courier New">│ Platform  │ macOS-14.1-x86_64-i386-64bit │</font></div><div><font face="Courier New">│  Python   │       3.12.0 (CPython)       │</font></div><div><font face="Courier New">│   PyQt6   │            6.6.0             │</font></div><div><font face="Courier New">│    Qt6    │            6.6.0             │</font></div><div><font face="Courier New">╰───────────┴──────────────────────────────╯</font></div></div><div><font face="Courier New"><br></font></div><div>I also ran the test using the other Python Qt wrapper (PySide6) and it too crashed in a similar manner. This seems to imply that the problem lies with Qt6 itself, not PyQt6. If you can get a C++ version of your test case to reproduce the crash you could submit a bug report to Qt's maintainers.</div><div><br></div><div>Sorry not to be of direct help.</div><div><br></div><div>Regards,</div><div>Colin McPhail</div></div></blockquote></div>