[Qgis-developer] [Linux Mint] QGIS Master 3d93237

Luigi Pirelli luipir at gmail.com
Tue Nov 3 07:39:12 PST 2015


just to confirm that partially reverting:

https://github.com/qgis/QGIS/commit/cd0eb05deddc610a1a79c40163504efddfe3da3a#diff-b19637a490515a065417f10b2ef58bbb:

using PyString_check instead of PyUnicode_check solve on Ubuntu 15.15
and Python 2.7.10.

my solution is in src/python/qgspythonutilsimpl.cpp:381

  /* And it should be a string all ready to go - duplicate it. */
  if ( !PyUnicode_CheckExact( obResult ) )
      if ( !PyString_Check( obResult ) )
        TRACEBACK_FETCH_ERROR( "getvalue() did not return a string" );

regards
Luigi Pirelli

**************************************************************************************************
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Elance: https://www.elance.com/s/edit/luigipirelli/
* GitHub: https://github.com/luipir
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* Mastering QGIS:
https://www.packtpub.com/application-development/mastering-qgis
**************************************************************************************************


On 26 October 2015 at 23:10, Matthias Kuhn <matthias at opengis.ch> wrote:
> Do you have any evidence that it's the PyUnicode_Check? I think that
> should be supported by Python 2.7 as well.
>
> The other error by Richard from IRC  (PyUnicode_AsUTF8) makes more
> sense, since it's not supported by 2.7 but it should be ifdef'd, strange
> that this happens. Maybe re-running cmake would help??
>
> On 10/26/2015 06:57 PM, Luigi Pirelli wrote:
>> Python 2.7.10 (default, Oct 14 2015, 16:09:02)
>> [GCC 5.2.1 20151010] on linux2
>>
>> and
>>
>> Python 3.4.3+ (default, Oct 14 2015, 16:03:50)
>> [GCC 5.2.1 20151010] on linux
>> Luigi Pirelli
>>
>> **************************************************************************************************
>> * LinkedIn: https://www.linkedin.com/in/luigipirelli
>> * Elance: https://www.elance.com/s/edit/luigipirelli/
>> * GitHub: https://github.com/luipir
>> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
>> * Mastering QGIS:
>> https://www.packtpub.com/application-development/mastering-qgis
>> **************************************************************************************************
>>
>>
>> On 26 October 2015 at 17:53, Matthias Kuhn <matthias at opengis.ch> wrote:
>>> Hi Luigi,
>>>
>>> What's the python version on your system?
>>>
>>> Matthias
>>>
>>> On 10/26/2015 10:32 AM, Luigi Pirelli wrote:
>>>> Hi Mathias
>>>>
>>>> seems related with this your commit about Python3 compatbility
>>>>
>>>> cd0eb05deddc610a1a79c40163504efddfe3da3a
>>>>
>>>> src/python/qgspythonutilsimpl.cpp
>>>> -  if ( !PyString_Check( obResult ) )
>>>> +  if ( !PyUnicode_Check( obResult ) )
>>>>      TRACEBACK_FETCH_ERROR( "getvalue() did not return a string" );
>>>>
>>>>
>>>> Luigi Pirelli
>>>>
>>>> **************************************************************************************************
>>>> * LinkedIn: https://www.linkedin.com/in/luigipirelli
>>>> * Elance: https://www.elance.com/s/edit/luigipirelli/
>>>> * GitHub: https://github.com/luipir
>>>> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
>>>> * Mastering QGIS:
>>>> https://www.packtpub.com/application-development/mastering-qgis
>>>> **************************************************************************************************
>>>>
>>>>
>>>> On 25 October 2015 at 22:06, Luigi Pirelli <luipir at gmail.com> wrote:
>>>>> confirmed also ubuntu 15.10 and just pulled the qgis code.
>>>>>
>>>>> last log messages was oading the python module:
>>>>>
>>>>> src/app/qgisapp.cpp: 7911: (loadPythonSupport) [3ms] load library
>>>>> /home/ginetto/PROGRAMMING/QGIS-2.0-master/build/output/lib/qgispython
>>>>> (2.13.0)
>>>>>
>>>>> regards
>>>>> Luigi Pirelli
>>>>>
>>>>> **************************************************************************************************
>>>>> * LinkedIn: https://www.linkedin.com/in/luigipirelli
>>>>> * Elance: https://www.elance.com/s/edit/luigipirelli/
>>>>> * GitHub: https://github.com/luipir
>>>>> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
>>>>> * Mastering QGIS:
>>>>> https://www.packtpub.com/application-development/mastering-qgis
>>>>> **************************************************************************************************
>>>>>
>>>>>
>>>>> On 25 October 2015 at 15:42, João Gaspar <joao.f.r.gaspar at gmail.com> wrote:
>>>>>> Hi guys,
>>>>>>
>>>>>> today after compile and install the master version when i open QGIS Master
>>>>>> and he give me this error:
>>>>>>
>>>>>> Couldn't load PyQGIS.
>>>>>> Python support will be disabled.
>>>>>>
>>>>>>
>>>>>> getvalue() did not return a string
>>>>>>
>>>>>> Python version:
>>>>>> 2.7.6 (default, Jun 22 2015, 18:01:27)
>>>>>> [GCC 4.8.2]
>>>>>>
>>>>>> QGIS version:
>>>>>> 2.13.0-Master 'Master', 3d93237
>>>>>>
>>>>>> Python path:
>>>>>> ['/home/joao/apps/share/qgis/python', u'/home/joao/.qgis2/python',
>>>>>> u'/home/joao/.qgis2/python/plugins',
>>>>>> '/home/joao/apps/share/qgis/python/plugins', '/usr/lib/python2.7',
>>>>>> '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk',
>>>>>> '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload',
>>>>>> '/usr/local/lib/python2.7/dist-packages',
>>>>>> '/usr/lib/python2.7/dist-packages',
>>>>>> '/usr/lib/python2.7/dist-packages/PILcompat',
>>>>>> '/usr/lib/python2.7/dist-packages/gst-0.10',
>>>>>> '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7',
>>>>>> '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
>>>>>>
>>>>>>
>>>>>>
>>>>>> What can be the problem?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> João
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Qgis-developer mailing list
>>>>>> Qgis-developer at lists.osgeo.org
>>>>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>
>


More information about the Qgis-developer mailing list