473,569 Members | 2,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

trouble with pyvtk

Am trying to stumble through the demos for mayavi, after having set up
PyVTK-0.4.74 (together with numpy, scipy, vtk, and mayavi. I'm trying
to use pyvtk to generate a vtk dataset with the following:
>from Numeric import *
>>import scipy
import scipy.special
x = (arange(50.0)-25)/2.0
y = (arange(50.0)-25)/2.0
r = sqrt(x[:,NewAxis]**2+y**2)
z = 5.0*scipy.speci al.j0(r)
import pyvtk
z1 = reshape(transpo se(z), (-1,))
point_data = pyvtk.PointData (pyvtk.Scalars( z1))
grid = pyvtk.Structure dPoints((50,50, 1), (-12.5, -12.5, 0), (0.5, 0.5, 1))
data = pyvtk.VtkData(g rid, point_data)
data.tofile ('/tmp/test.vtk')
All is well until the last line (writing the file), after which the
following error occurs:

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/pyvtk/__init__.py", line 195,
in tofile
f.write(self.to _string(format) )
File "/usr/lib/python2.4/site-packages/pyvtk/__init__.py", line 177,
in to_string
ret.append(self .point_data.to_ string(format))
File "/usr/lib/python2.4/site-packages/pyvtk/Data.py", line 47, in
to_string
ret += [a.to_string(for mat) for a in self.data]
File "/usr/lib/python2.4/site-packages/pyvtk/Scalars.py", line 40,
in to_string
t = self.get_dataty pe(self.scalars )
File "/usr/lib/python2.4/site-packages/pyvtk/common.py", line 149,
in get_datatype
r = self.get_dataty pe(o)
File "/usr/lib/python2.4/site-packages/pyvtk/common.py", line 149,
in get_datatype
r = self.get_dataty pe(o)
File "/usr/lib/python2.4/site-packages/pyvtk/common.py", line 149,
in get_datatype
r = self.get_dataty pe(o)
File "/usr/lib/python2.4/site-packages/pyvtk/common.py", line 149,
in get_datatype

<snip<snip<snip <snip>

File "/usr/lib/python2.4/site-packages/pyvtk/common.py", line 149,
in get_datatype
r = self.get_dataty pe(o)
File "/usr/lib/python2.4/site-packages/pyvtk/common.py", line 140,
in get_datatype
if is_int(obj): return self.default_in t
RuntimeError: maximum recursion depth exceeded

I'm assuming my pyvtk installation is at issue here (?), but I don't
know enough about python to tell what has gone wrong, or how to fix
it. Can someone point me in the right direction?

May 18 '07 #1
3 1710
On May 18, 2:22 pm, LokiDawg <rsa4...@gmail. comwrote:

<snip>
All is well until the last line (writing the file), after which the
following error occurs:
<snip>
File "/usr/lib/python2.4/site-packages/pyvtk/common.py", line 140,
in get_datatype
if is_int(obj): return self.default_in t
RuntimeError: maximum recursion depth exceeded

I'm assuming my pyvtk installation is at issue here (?), but I don't
know enough about python to tell what has gone wrong, or how to fix
it. Can someone point me in the right direction?
This could be very well be a bug where infinite recursion happens, but
see if changing the recursion limit fixes this:
>>import sys
sys.getrecurs ionlimit()
1000
>>sys.setrecurs ionlimit(10000)
Regards,
Ondrej

May 18 '07 #2
On May 18, 12:41 am, obau...@gmail.c om wrote:
>
This could be very well be a bug where infinite recursion happens, but
see if changing the recursion limit fixes this:
>import sys
sys.getrecursi onlimit()
1000
>sys.setrecursi onlimit(10000)
Regards,
Ondrej
Thanks for the tip, Ondrej. Unfortunately, this didn't do it, as pytvk
still ends up at the same place:

File "/usr/lib/python2.4/site-packages/pyvtk/common.py", line 149,
in get_datatype
r = self.get_dataty pe(o)
File "/usr/lib/python2.4/site-packages/pyvtk/common.py", line 140,
in get_datatype
if is_int(obj): return self.default_in t

RuntimeError: maximum recursion depth exceeded

I would be interested if anyone else has this difficulty with pyvtk--
Regards, Rolf

May 21 '07 #3
En Mon, 21 May 2007 02:11:46 -0300, LokiDawg <rs*****@gmail. comescribi:
Thanks for the tip, Ondrej. Unfortunately, this didn't do it, as pytvk
still ends up at the same place:

File "/usr/lib/python2.4/site-packages/pyvtk/common.py", line 149,
in get_datatype
r = self.get_dataty pe(o)
File "/usr/lib/python2.4/site-packages/pyvtk/common.py", line 140,
in get_datatype
if is_int(obj): return self.default_in t

RuntimeError: maximum recursion depth exceeded
This looks like either a bug on pyvtk or maybe you making a circular
reference to something - either way I think you'll get more help from the
package developers.

--
Gabriel Genellina

May 21 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1871
by: James | last post by:
Hi I am having some trouble getting a asp page to load. Im a noob to the asp side. I have followed knowledege base Article 301305. I am running 2000 adv, IIS 5.0 I have the following settings to the folder that has the asp. Application settings
4
3830
by: Jacek Dziedzic | last post by:
Hi! First of all, I hope my problem is not too loosely tied to the "standard C++" that is the topic of this group. I have some code that exhibits a strange behaviour: on one computer, where I compile with g++-3.2 it compiles and works fine, on another computer, whether I compile with g++-3.0 or g++-2.95 (unfortunately 3.2 is not...
0
1541
by: Paul C | last post by:
Hello, everybody. I am having trouble running some of the VS.NET samples, specifically the CarSelector web app, which is very simple. The symptom is that the web controls (drop down listboxes and such) do not render correctly. They're almost invisible, and the others don't work at all, but just show their caption text. Not what should happen ...
1
1989
by: Jim Bancroft | last post by:
Hi everyone, I'm running into a problem with my ASP.Net application. I've just created a new aspx page which uses some new components of mine that inherit from ServicedComponent and are designed to run under COM+. This page works fine, unless I get fancy and hit my browser's refresh button quickly, as a test. Then, what I see happen is...
6
3773
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for one day): \\FFDS24\ASP.NET Applications(_LM_W3SVC_1_Root_ATV2004)\Errors During Execution: 7 \\FFDS24\ASP.NET Apps...
3
4982
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : >************************************************************************ > <WebMethod(), System.Web.Services.Protocols.SoapRpcMethod()> _ > Public Function...
2
1543
by: JLupear | last post by:
I am having trouble with my code again, I had prepared a question and the code to upload, however I am having trouble posting it, are there limits to the amount of lines you can post? I split it into 4 parts and am still having trouble uploading it. What am I doing wrong?
5
7719
by: Peter Pearson | last post by:
I'm trying to get started with pyvtk, the Python interface to the Visualization Toolkit, but there's obviously something important that I haven't figured out after an embarrassingly long morning of googling around. When I run sample pyvtk code (example1.py, from http://cens.ioc.ee/cgi-bin/viewcvs.cgi/python/pyvtk/examples/example1.py),...
0
1661
by: mrchatgroup | last post by:
news from http://www.mrchat.net/myblog/myblog/small-accidents-mean-big-trouble-for-supercollider.html Small Accidents Mean Big Trouble for Supercollider Image Scientists expect startup glitches in the massive, complex machines they use to smash atoms.
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.