Re: some problems
Irmen de Jong <[email protected]> Tue, 31 Mar 2015 19:52:16 +0200
| Newsgroups | gmane.comp.python.pyro |
|---|---|
| Message-ID | <[email protected]> |
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?
> 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)
> Any idea how to solve these problems?
Try simplifying the issue. Call "the class" / GetDriverByName directly. Enable
logging/debug print statements. Print the full Pyro traceback instead of just the simple
TypeError. Set a breakpoint in the offending code and see what arguments are passed in.
A lot of possibilities, without seeing actual code that manifests your problem it is
hard to say.
Irmen
------------------------------------------------------------------------------
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/