Python Forum
Problem loading geometries with trimesh
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem loading geometries with trimesh
#1
I am trying to use trimesh to load geometries and analyze them, but I simply can not get python/ trimesh to load them at all.
I´ve tried both .obj and .stl formats. Both not working.

import trimesh

def load_and_inspect_stl(file_path):
        mesh = trimesh.load(file_path)
  
input_file = r"C:\Users\willy\desktop\part1.stl"

load_and_inspect_stl(input_file)
Error:
File ~\anaconda3\Lib\site-packages\numpy\core\fromnumeric.py:2684 in ptp return _methods._ptp(a, axis=axis, out=out, **kwargs) File ~\anaconda3\Lib\site-packages\numpy\core\_methods.py:220 in _ptp umr_maximum(a, axis, None, out, keepdims), TypeError: '_NoValueType' object cannot be interpreted as an integer
I have no idea, what´s meant by this error or where to find this '_NoValueType' object

I can open the files using meshlab or paint3D. I´ve updated trimesh to the latest version.
I have no idea what I should do to solve this.
Reply
#2
I'm also using Anaconda: your snippet works well for me (i used 2 different STL files, so i'm wondering if:
  • is your STL file correct?
  • how have you installed trimesh? from the conda-forge?
Gribouillis likes this post
Reply
#3
(Aug-06-2024, 09:36 AM)paul18fr Wrote: I'm also using Anaconda: your snippet works well for me (i used 2 different STL files, so i'm wondering if:
  • is your STL file correct?
  • how have you installed trimesh? from the conda-forge?

I´m sure my files are fine.
I installed trimesh using the pip command in anaconda prompt. Could this be the problem?
Reply
#4
I do not use pip with Anaconca, but rather i open a "conda prompt" and type:
conda update --all --yes
conda install conda-forge::trimesh

(conda prompt from Windows start menu -> Anaconda (64 bits) -> Anaconda prompt)

I suggest you to uninstall trimesh from pip and to reinstall from conda prompt

Paul
Gribouillis likes this post
Reply
#5
(Aug-06-2024, 11:55 AM)paul18fr Wrote: I do not use pip with Anaconca, but rather i open a "conda prompt" and type:
conda update --all --yes
conda install conda-forge::trimesh

(conda prompt from Windows start menu -> Anaconda (64 bits) -> Anaconda prompt)

I suggest you to uninstall trimesh from pip and to reinstall from conda prompt

Paul

Hey thx for the advice. It´s working Big Grin
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  glTexImage2D is having problem loading img [update] buzzdarkyear 0 1,756 Jan-12-2022, 04:44 PM
Last Post: buzzdarkyear
  Problem loading an image dataset into Tensorflow MohammedSohail 1 2,091 Jun-09-2020, 02:09 PM
Last Post: nuffink

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020