Search code examples
pythonsst

Python : NameError: name 'StandardError' is not defined


I'm currently developing a website with the SST - Web Test Framework (i'm very beginner) but I have a problem with python

I used this Link: https://pypi.python.org/pypi/sst/0.2.2

I m using - Python 3.6.4 and SST - Web Test Framework- Latest Version: 0.2.4

My Code is:

from sst.actions import *
go_to('http://www.google.com/')

Error is:

C:\Python\scrapy-master\Projects>python proxyhar.py
Traceback (most recent call last):
File "proxyhar.py", line 1, in <module>
from sst.actions import *
File "C:\Python\lib\site-packages\sst\actions.py", line 104, in <module>
class EndTest(StandardError):
NameError: name 'StandardError' is not defined

Anyone suggest me how to resolve this.

Thank you


Solution

  • sst only supports Python 2 even though pip will let you install it for Python 3. The error NameError: name 'StandardError' is not defined is from sst trying to use the built in exception StandardError which was removed in Python 3. To resolve this, you can either use a different module (which I would recommend) or downgrade to Python 2.7.