Python : 除了 OSError, e:
Python : except OSError, e:
我目前正在使用 SST - Web 测试框架开发一个网站(我是初学者)但是我遇到了 python
的问题
我用过这个Link:https://pypi.python.org/pypi/sst/0.2.2
我正在使用 - Python 3.6.4 和 SST - Web 测试框架 - 最新版本:0.2.4
我的密码是:
from sst.actions import *
go_to('http://www.google.com/')
错误是:
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 274, in <module>
except OSError, e:
^
SyntaxError: invalid syntax
有人建议我如何解决这个问题。
谢谢
Python 3 改变了这个表达式的书写方式。 From the documentation,现在是except OSError as e
。
注意在Python2中,both comma and as
were permitted.
我目前正在使用 SST - Web 测试框架开发一个网站(我是初学者)但是我遇到了 python
的问题我用过这个Link:https://pypi.python.org/pypi/sst/0.2.2
我正在使用 - Python 3.6.4 和 SST - Web 测试框架 - 最新版本:0.2.4
我的密码是:
from sst.actions import *
go_to('http://www.google.com/')
错误是:
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 274, in <module>
except OSError, e:
^
SyntaxError: invalid syntax
有人建议我如何解决这个问题。
谢谢
Python 3 改变了这个表达式的书写方式。 From the documentation,现在是except OSError as e
。
注意在Python2中,both comma and as
were permitted.