Bug report #19605

PyCapsule_GetPointer called with incorrect name

Added by David Wickland over 1 year ago. Updated about 1 year ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Python bindings / sipify
Affected QGIS version:3.2.1 Regression?:No
Operating System:MacOS (High Sierra) Easy fix?:No
Pull Request or Patch supplied:No Resolution:no timely feedback
Crashes QGIS or corrupts data:No Copied to github as #:27432

Description

Running QGIS 3.2.1 on Mac OS installed through Homebrew, was initially setup and working fine. However, after updating all my pip packages (and there are a bunch of them) I've now started to get these errors on startup leading to no python support:

1st Message:

Couldn't load PyQGIS.
Python support will be disabled.

Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.6/site-packages/qgis/__init__.py", line 80, in
import qgis.gui
File "/usr/lib/python3.6/site-packages/qgis/gui/__init__.py", line 27, in
from qgis._gui import *
ValueError: PyCapsule_GetPointer called with incorrect name

2nd message:

An error occurred during execution of following code:
qgis.utils.uninstallErrorHook()

Traceback (most recent call last):
File "", line 1, in
NameError: name 'qgis' is not defined

Tried reverting all of these to a previous version, but to no avail. Currently python packages running these versions:
PyQt5: 5.11.2
PyQt5-sip: 4.19.12
sip: 4.19.12
QScintilla: 2.10.7

And Homebrew Libraries with these versions:
QGIS 3.2.1-Bonn
Qt 5.11.1 (Same as compiled against)
QScintilla: 2.10.4
Python 3.7.0

Very Similar to Bug #19374-4

History

#1 Updated by Jürgen Fischer over 1 year ago

  • Description updated (diff)

Was QGIS rebuilt after updating sip?

#2 Updated by Jürgen Fischer over 1 year ago

  • Status changed from Open to Feedback

#3 Updated by David Wickland over 1 year ago

I've tried both using the base homebrew pre-compiled version, as well as building it myself. The error in the bug report is for the pre-compiled binary setup. Compiling myself fails with this (probably related) error:

/tmp/qgis3-20180817-20222-103zkut/QGIS-final-3_2_1/build/python/core/sip_corepart0.cpp:23755:40: error: use of undeclared identifier 'SIP_MODULE_NAME'
sip_sipmod = PyImport_ImportModule(SIP_MODULE_NAME);
^
/tmp/qgis3-20180817-20222-103zkut/QGIS-final-3_2_1/build/python/core/sip_corepart0.cpp:23780:90: error: use of undeclared identifier 'SIP_MODULE_NAME'
sipAPI__core = reinterpret_cast<const sipAPIDef *>(PyCapsule_GetPointer(sip_capiobj, SIP_MODULE_NAME "._C_API"));

#4 Updated by David Wickland over 1 year ago

Just updating that the issue still occurs in version 3.2.2, both when using the pre-compiled .app and compiling myself.

#5 Updated by David Wickland over 1 year ago

Update:
I've gotten the pre-compiled binary to work if I:
1. Uninstall SIP in Python
2. Downgrade QScintilla in Python from 2.10.7 to 2.10.4 (to match Homebrew's version)
3. Reinstall SIP in Homebrew
4. Relink SIP & QScintilla in Homebrew
5. Install QGIS3 without build options

Trying to compile myself still throws the same errors..

#6 Updated by Jürgen Fischer about 1 year ago

  • Resolution set to no timely feedback
  • Status changed from Feedback to Closed

Bulk closing 82 tickets in feedback state for more than 90 days affecting an old version. Feel free to reopen if it still applies to a current version and you have more information that clarify the issue.

Also available in: Atom PDF