QF-Error-Tracking / QFVD5

0 stars 0 forks source link

PyVistaQF VTK compatibility help, AttributeError: 'StructuredGrid' object has no attribute 'point_arrays' #18

Closed mathfire closed 1 year ago

mathfire commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

placecam = np.int(plot_params['PLACECAM'])

To Reproduce Link to input files [e.g. Google Drive or Box] or Email: Dev Team will reach out if input files are needed

Here’s my original call (its PyVistaQF to visual a 500m watershed focus area)
((base) cotopaxi:python3 amasarie$ python3 PyVistaQF.py /Users/amasarie/Research/QF_5.2.3/proj/Chambers-500m/

Desktop (please complete the following information):

Screenshots If applicable, add screenshots to help explain your problem.

Thanks will do - 
QF_GitBub_02
zacharycope0 commented 1 year ago

Could you clean up this issue and tag @drobinson6045. In addition to the error message, you will need to explain your steps/desired outcome, post a link to your input files, and share the Pyvista version you are using.

amarcozzi commented 1 year ago

Hey @mathfire I've run into this before. The PyVistaQF script uses features from a several year old version of Pyvista which are long since deprecated. It's possible to build the correct environment using the packages in the pip or conda requirements file, but there's a very narrow range of Python versions which are capable of satisfying the requirements. I was able to get it to work with Python 3.8.16.

ntutland commented 1 year ago

I was able to get more of the code to run by changing "point_arrays" to "point_data" for StructuredGrid objects, and changing "cell_arrays" to "cell_data" for UnstructuredGrid objects. However, now the code is just sitting there, not throwing an error, but also not completing the task -- not sure if that is related or not. I'll try with python 3.8.16 and see what happens

mathfire commented 1 year ago

Yes! This solves it!! Thanks for the update, glad this triggered in my email too.

Again, sorry for not cleaning up this issue!! I will post another on here soon, better format all around,

I continually get the versioning wrong too!! So that has been my culprit for this and other issues. Better version control for me has led to the code running better, Anaconda environments seem to be the way to go, which thanks to Zach and Daniel taught me all that - NMC does have Anaconda Navigator on our machines, which helps me stay organized without much hassle on the MacBook M2 from NMC. I attached a screenshot that highlights version control -

All the best, Alex

Anaconda Navigator