Re: some problems

Luca Delucchi <[email protected]> Wed, 1 Apr 2015 23:26:22 +0200
Newsgroups gmane.comp.python.pyro
Message-ID <CAK4m-3x2dbXv+v37j1_bJthjLHeAXO1B+xrgram-tWHUx+fz+w@mail.gmail.com>
On 31 March 2015 at 19:52, Irmen de Jong <[email protected]> wrote:
> On 31-3-2015 16:32, Luca Delucchi wrote:
>
>> but If I pass also the last parameter of the function I got a problem
>>
>> cgdal.initialize(['/incoming/lucadelu/data/S2-8_lidar',
>> '/incoming/lucadelu/data/S2-8'], '/incoming/lucadelu/test.tif',
>> 'GTIFF')
>>
>> ---------------------------------------------------------------------------
>> TypeError                                 Traceback (most recent call last)
>> <ipython-input-12-43d08be34778> in <module>()
>> ----> 1 cgdal.initialize(['/incoming/lucadelu/data/S2-8_lidar',
>> '/incoming/lucadelu/data/S2-8'], '/incoming/lucadelu/test.tif',
>> 'GTIFF')
>>
>> /usr/local/lib/python2.7/dist-packages/Pyro4/core.pyc in
>> __call__(self, *args, **kwargs)
>>     167
>>     168     def __call__(self, *args, **kwargs):
>> --> 169         return self.__send(self.__name, args, kwargs)
>>     170
>>     171
>>
>> /usr/local/lib/python2.7/dist-packages/Pyro4/core.pyc in
>> _pyroInvoke(self, methodname, vargs, kwargs, flags, objectId)
>>     396                         if sys.platform == "cli":
>>     397
>> util.fixIronPythonExceptionForPickle(data, False)
>> --> 398                         raise data
>>     399                     else:
>>     400                         return data
>>
>> TypeError: in method 'GetDriverByName', argument 1 of type 'char const *'
>
> The error is in your own method GetDriverByName. I have no idea what this method does.
> It is very strange though that it reports a TypeError containing what seems to be part
> of a C-language error ("char const *").
>
>> It seems that Pyro is doing some magic :-)
>
> That remains to be seen :-)
> Does the GetDriverByName method work without using Pyro? If so, what arguments are you
> passing into it? In what way do they differ from the call via Pyro?
>

the answer was quiet simple, pyro4 during serialization transform
string in unicode and the  GetDriverByName method don't like unicode

>
>> I have a similar problem with another server, I pass to the object a
>> list of strings but only the first is read by the class.
>
> I don't know what you mean by "only the first is read". It does sounds like a problem in
> "the class", not with Pyro (Pyro just passes on the parameters it receives)
>

There was a problem, instead receiving a list it got string, I don't
know how, but now it works

>
> Irmen
>

Thanks

-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/