exceptions.RuntimeError - Object has no attribute errno [closed]

2024/10/9 6:23:04

I'm working with Maya 2018 and there's a weird thing going on. When I select multiple vertices, faces or edges I get:

// Error: AttributeError: file <string> line 88: 'exceptions.RuntimeError' object has no attribute 'errno' // 
// Warning: Python callback failed // 

The problem with this in what I'm scripting is that when this warning/error appears, somehow it does not let me click on my custom GUI buttons. For example. I need to select a few vertices then click a button to save them into a custom attribute... Well I can't click that button right away, and I'm guessing it is because of this weird error.

Any ideas on what this is?

Answer

In line 88 of your script you're trying to use attribute errno of RuntimeError instance but this exception class has no such attribute.
Read documentation of exceptions before trying to handle them.

Atrribute errno is defined only in OSError and classes inheriting from it.
So apparently line 88 is part of try...except clause and in that line you're trying to use e.errno. You can't do that if the exception doesn't belong to OSError exceptions family.

https://en.xdnf.cn/q/118620.html

Related Q&A

How can I translate this python function to c++?

I am trying to translate a python function to c++ without success. Can someone help me? The python function receives as input a string S and 2 integers (fragment_size and jump). The aim of this functi…

Reverse PDF imposition

I have an imposed document: there are 4 n A4 pages on the n sheets. I put them into a roller image scanner and receive one 2 n paged PDF document (A3).If, say, n = 3, then Ive got the following seque…

Python: How to run flask mysqldb on Windows machine?

Ive installed the flask-mysqldb module with pip package management system on my Windows machine and I dont know how to run it.I have tried to add the path to the MySQLdb in System properties and still …

Match a pattern and save to variable using python

I have an output file containing thousands of lines of information. Every so often I find in the output file information of the following formInput Orientation: ... content ... Distance matrix (angstro…

Sharing a Queue instance between different modules

I am new to Python and I would like to create what is a global static variable, my thread-safe and process-safe queue, between threads/processes created in different modules. I read from the doc that t…

Square a number with functions in python [duplicate]

This question already has answers here:What does it mean when the parentheses are omitted from a function or method call?(6 answers)Closed last year.This is an extremely easy question for Python. Its…

Changing the cell name

I have a file that contains the following:NameABCD0145ABCD1445ABCD0998And Im trying to write a cod that read every row and change the name to the following format:NameABCD_145ABCD_1445ABCD_998keeping i…

Procfile Heroku

I tried to deploy my first Telegram chatbot (done with Chatterbot library) on Heroku. The files of my chatbot are: requirements (txt file) Procfile (worker: python magghybot.py) botusers (csv file) Mag…

How do i loop a code until a certain number is created?

This task is to determine the difference between two attributes, strength and skill, from game characters. The process for this is:Determining the difference between the strength attributes. The differ…

Finding the longest list in given list that contains only positive numbers in Python [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.Want to improve this question? Update the question so it focuses on one problem only by editing this post.Closed l…