Forums

Unknown attribute "Identified" is throwing "AttributeError"

I am getting this error "AttributeError: 'module' object has no attribute 'Identified'" from my flask app, and main website shows "Unhandled Exception". While the same app is running fine as a localhost on my computer and in my app i have never used a word "Identified" to describe any variable/method/class/module name/. .or any object. My site was running perfectly; and suddenly i got this error. I didn't changed a single line of code in my app. Any idea about how to resolve this?

Hi xbrlfinapp,

That cryptic error means that you wsgi.py file for the webapp cannot even be imported. have you tried running python /var/www/xbrlfinapp_pythonanywhere_com_wsgi.py? That typically tells you what the issue with the module is.

We've made some changes to our code in order for this to be more obvious but it hasn't been released yet.

As to why it just started happening, Perhaps you made a code change without restarting the webapp? We had a very short outage just before 5pm which involved taking down some servers and replacing them with new ones. That would have definitely caused your webapp to restart and try to import the code again. However it just can't so that is why you are seeing an error.

Just to add to what Hansel said, you might find that pyflakes gives you more useful diagnostics than running python. It also has the advantage that it doesn't actually execute the code, simply performs static analysis of it, so you can avoid any side-effects of running the script. Side-effects are unlikely to be a problem for web apps, but it's useful to bear in mind.

Thanks Hansel. I tried running that wsgi file in my terminal and i got the detailed description of the error. Screenshot of that error is at "http://goo.gl/lg7Tk". That was related to local sqlalchemy installation. I don't know why it didn't happen for last two months while my app was running perfectly. I have removed all my local installation which you are providing by default! After doing all these that error got resolved! And now i am getting "502 Bad Gateway"?

Now i am not getting "502 Bad Gateway" error. Everything is now working as expected. Thanks!!!

Good to know!

am getting a :AttributeError: 'module' object has no attribute 'application' error

That usually means that your wsgi file does not have a top level variable called application. It should be a WSGI app. Depending on the framework, it gets created in different ways.