Thank you.
'NoneType' object has no attribute 'id'
'NoneType' object has no attribute 'id'
I am trying to do an eigenanalysis of a building, when I run the analysis, I get the 'NoneType' object has no attribute 'id' error. Can anyone suggest me a way that I can solve this issue?
Thank you.
![Image]()
Thank you.
- Attachments
-
- error.png (31.58 KiB) Viewed 106765 times
Re: 'NoneType' object has no attribute 'id'
If you look at the last line of the traceback, it is trying to get the "id" attribute from the "phys_prop" object, which is "NoneType". In python it means it is a null object.
What happens is that at some edge with a forceBeamColumn element property, you don't have any physical property
What happens is that at some edge with a forceBeamColumn element property, you don't have any physical property
Re: 'NoneType' object has no attribute 'id'
Works now. Thank you
Re: 'NoneType' object has no attribute 'id'
you're welcome
Re: 'NoneType' object has no attribute 'id'
Hi STKO team, I have similar issue, how do you know which element does not have physical property? I have checked many times.STKO Team wrote: ↑Thu Feb 10, 2022 8:48 amIf you look at the last line of the traceback, it is trying to get the "id" attribute from the "phys_prop" object, which is "NoneType". In python it means it is a null object.
What happens is that at some edge with a forceBeamColumn element property, you don't have any physical property
Re: 'NoneType' object has no attribute 'id'
Hi I have the same problem. Kindly advise...
Re: 'NoneType' object has no attribute 'id'
You have to look at the last line of the traceback of the error.
It will tell you what element is missing a physical property
It will tell you what element is missing a physical property
Re: 'NoneType' object has no attribute 'id'
Dear SKTO team, the last line of the traceback of the error shows lines in the python file, not the element number? I attached my traceback, It looks like something is wrong with the elastic-beam-column members, but I even deleted them and assigned properties again, and still does not work and the traceback is the same. thoughts?
Thanks!
- Attachments
-
- traceback.png (121.63 KiB) Viewed 106447 times
Re: 'NoneType' object has no attribute 'id'
exactly, it is saying that at least one edge with the elasticBeamColumn element element property does not have any physical property.
namePh = phys_prop.XObject.Xnamespace
NoneType (in this case "phys_prop") does not have the XObject attribute. In fact it is None, which in python means "Nothing", i.e. no physical property assigned.
namePh = phys_prop.XObject.Xnamespace
NoneType (in this case "phys_prop") does not have the XObject attribute. In fact it is None, which in python means "Nothing", i.e. no physical property assigned.
-
malcomjarr
- Posts: 1
- Joined: Mon Aug 08, 2022 6:17 am
Re: 'NoneType' object has no attribute 'id'
AttributeError means that there was an Error that had to do with an Attribute request. In general, when you write x.y, y is the purported attribute of x. NoneType means that instead of an instance of whatever Class or Object you think you're working with, you've actually got None. That usually means that an assignment or function call up failed or returned an unexpected result.
The sort() method of a Python list sorts the list in-place, that is, mylist is modified. But the actual return value of the method is None and not the list sorted. So you've just assigned None to mylist. If you next try to do, say, mylist.append(1) Python will give you this error.
Code: Select all
mylist = mylist.sort()