-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeErrors - Tutorial Examples #88
Comments
Hi Mostafa, Thanks for reaching out with this bug report. I believe matplotlib updated 3D graphics since I last wrote the code. It looks like this is the particular error: https://stackoverflow.com/questions/67095247/gca-and-latest-version-of-matplotlib. I'll take a look in the next week at fixing this. If you need to use MicroStructPy in the meantime, you could use a virtual environment with a version of matplotlib from 2020 and it should work in there. Best, |
Thanks for your help! Regards, |
Hi Mostafa, I'm glad the script is working now. Sorry there's an issue with using abaqus file format. What about it didn't work? Could you post a script that produces the error? Best, |
Hi Kip, Thanks for your prompt response. Regards, |
Hi Mostafa, Could you clarify whether you changed the source code for trimesh.py or you changed the input keyword argument to an instance of the class? Showing me some of the code would help. Best, https://github.com/kip-hart/MicroStructPy/blob/master/src/microstructpy/meshing/trimesh.py#L262 |
Hi Kip, The main objective is to execute this example: https://docs.microstructpy.org/en/latest/examples/cli/basalt.html I have changed the input keyword argument at trimesh.py; the Abaqus input file option, format='abaqus' in [TriMesh.write()]. But, there is no change happened. Regards, |
Hi Mostafa, Thanks for the explanation. Please change the write function back to Try this input file and see if it writes the trimesh to an abaqus inp file: <?xml version="1.0" encoding="UTF-8"?>
<input>
<material>
<name> Plagioclase </name>
<fraction>
<dist_type> norm </dist_type>
<loc> 45.2 </loc>
<scale> 0.2 </scale>
</fraction>
<size>
<dist_type> cdf </dist_type>
<filename> aphanitic_cdf.csv </filename>
</size>
<color> #BDBDBD </color>
</material>
<material>
<name> Olivine </name>
<shape> ellipse </shape>
<fraction>
<dist_type> norm </dist_type>
<loc> 19.1 </loc>
<scale> 0.2 </scale>
</fraction>
<size>
<dist_type> cdf </dist_type>
<filename> olivine_cdf.csv </filename>
</size>
<aspect_ratio>
<dist_type> uniform </dist_type>
<loc> 1.0 </loc>
<scale> 2.0 </scale>
</aspect_ratio>
<angle_deg>
<dist_type> uniform </dist_type>
<loc> -90 </loc>
<scale> 180 </scale>
</angle_deg>
<color> #99BA73 </color>
</material>
<material>
<name> Diopside </name>
<fraction>
<dist_type> norm </dist_type>
<loc> 13.2 </loc>
<scale> 0.2 </scale>
</fraction>
<size>
<dist_type> cdf </dist_type>
<filename> aphanitic_cdf.csv </filename>
</size>
<color> #709642 </color>
</material>
<material>
<name> Hypersthene </name>
<fraction>
<dist_type> norm </dist_type>
<loc> 16.6 </loc>
<scale> 0.2 </scale>
</fraction>
<size>
<dist_type> cdf </dist_type>
<filename> aphanitic_cdf.csv </filename>
</size>
<color> #876E59 </color>
</material>
<material>
<name> Magnetite </name>
<fraction>
<dist_type> norm </dist_type>
<loc> 3.35 </loc>
<scale> 0.2 </scale>
</fraction>
<size>
<dist_type> cdf </dist_type>
<filename> aphanitic_cdf.csv </filename>
</size>
<color> #6E6E6E </color>
</material>
<material>
<name> Chromite </name>
<fraction>
<dist_type> norm </dist_type>
<loc> 0.65 </loc>
<scale> 0.2 </scale>
</fraction>
<size>
<dist_type> cdf </dist_type>
<filename> aphanitic_cdf.csv </filename>\
</size>
<color> #545454 </color>
</material>
<material>
<name> Ilmenite </name>
<fraction>
<dist_type> norm </dist_type>
<loc> 0.65 </loc>
<scale> 0.2 </scale>
</fraction>
<size>
<dist_type> cdf </dist_type>
<filename> aphanitic_cdf.csv </filename>
</size>
<color> #6B6B6B </color>
</material>
<material>
<name> Apatite </name>
<fraction>
<dist_type> norm </dist_type>
<loc> 3.35 </loc>
<scale> 0.2 </scale>
</fraction>
<size>
<dist_type> cdf </dist_type>
<filename> aphanitic_cdf.csv </filename>
</size>
<color> #ABA687 </color>
</material>
<domain>
<shape> circle </shape>
<diameter> 10 </diameter>
</domain>
<settings>
<directory> basalt_circle </directory>
<filetypes>
<seeds_plot> png </seeds_plot>
<poly_plot> png </poly_plot>
<tri> abaqus </tri> <!-- this is where trimesh output file type is specified -->
<tri_plot> png </tri_plot>
<verify_plot> png </verify_plot>
</filetypes>
<plot_axes> False </plot_axes>
<verbose> True </verbose>
<verify> True </verify>
<mesh_max_edge_length> 0.01 </mesh_max_edge_length>
<mesh_min_angle> 20 </mesh_min_angle>
<mesh_max_volume> 0.05 </mesh_max_volume>
<seeds_kwargs>
<linewidths> 0.2 </linewidths>
</seeds_kwargs>
<poly_kwargs>
<linewidths> 0.2 </linewidths>
</poly_kwargs>
<tri_kwargs>
<linewidths> 0.1 </linewidths>
</tri_kwargs>
</settings>
</input> |
Thank you for explaining everything so well. Regards, |
Hi Kip, Sorry for confusion, but I got an Abaqus input file. Thank you very much for your patience and consideration. Regards, |
Hi Mostafa, The issue with TypeErrors has been resolved and I've updated microstructpy to v1.5.7. If you upgrade to the latest, that issue will be fixed. Feel free to reopen or submit another ticket if you have any other issues. Best, |
Hi Kip, We really appreciate the knowledge. Sure, I'll let you know if I have any questions. Regards, |
Hi,
My name is Mostafa Mohamed and am a graduate student at Arizona State University.
I am reporting this bug as follows: the error appears:
"TypeError: FigureBase.gca() got an unexpected keyword argument 'projection'"
Thanks in advance for any help!
Regards,
Mostafa
The text was updated successfully, but these errors were encountered: