You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In line 372 of the libpysal/weights/weights.py file, the getattr function is called to assign a value to try_weightcol. However, since the third parameter of getattr (the default value to be returned when the attribute is not found) is not passed, it will result in an AttributeError: 'DataFrame' object has no attribute 'weight' if the 'weight_col' column is not present in the 'adjlist', and this will terminate the program.
So, when will the code at lines 373-375 be executed?
Question Description
In line 372 of the libpysal/weights/weights.py file, the
getattr
function is called to assign a value totry_weightcol
. However, since the third parameter ofgetattr
(the default value to be returned when the attribute is not found) is not passed, it will result in anAttributeError: 'DataFrame' object has no attribute 'weight'
if the 'weight_col' column is not present in the 'adjlist', and this will terminate the program.So, when will the code at lines 373-375 be executed?
Essential Information
The text was updated successfully, but these errors were encountered: