如何解决每次我在 VSCode 中的 python 上运行“生菜”时都会出错
我正在尝试在生菜(小黄瓜)中运行一个简单的测试,但我无法通过以下错误。 这是测试:
Feature: Go to google
Scenario: Visit Google
Given I go to "http://www.google.com/"
When I fill in field with class "gsfi" with "testingbot"
Then I should see "testingbot.com" within 2 second
这是错误:
PS C:\Users\\Documents\PYTHON\features\lettuce-browserstack> lettuce
Traceback (most recent call last):
File "C:\Users\mihai.costache.DEA\AppData\Roaming\Python\python39\Scripts\lettuce-script.py",line 33,in <module>
sys.exit(load_entry_point('lettuce==0.2.23','console_scripts','lettuce')())
File "C:\Users\mihai.costache.DEA\AppData\Roaming\Python\python39\Scripts\lettuce-script.py",line 25,in importlib_load_entry_point
return next(matches).load()
File "c:\program files\python39\lib\importlib\Metadata.py",line 77,in load
module = import_module(match.group('module'))
File "c:\program files\python39\lib\importlib\__init__.py",line 127,in import_module
return _bootstrap._gcd_import(name[level:],package,level)
File "<frozen importlib._bootstrap>",line 1030,in _gcd_import
File "<frozen importlib._bootstrap>",line 1007,in _find_and_load
File "<frozen importlib._bootstrap>",line 972,in _find_and_load_unlocked
File "<frozen importlib._bootstrap>",line 228,in _call_with_frames_removed
File "<frozen importlib._bootstrap>",line 986,line 680,in _load_unlocked
File "<frozen importlib._bootstrap_external>",line 786,in exec_module
File "<frozen importlib._bootstrap_external>",line 923,in get_code
File "<frozen importlib._bootstrap_external>",line 853,in source_to_code
File "<frozen importlib._bootstrap>",in _call_with_frames_removed
File "C:\Users\mihai.costache.DEA\AppData\Roaming\Python\python39\site-packages\lettuce\__init__.py",line 179
print "Error loading step deFinitions:\n",e
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Error loading step deFinitions:\n",e)?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。