testerSunshine / 12306

12306智能刷票,订票
MIT License
33.88k stars 9.79k forks source link

语法错误??? #321

Closed Vincentyao1995 closed 5 years ago

Vincentyao1995 commented 5 years ago

描述问题

(ticket) sensetime@G105E1800233:~/Desktop/vinny/tools_vin/12306-master$ sudo python run.py
Traceback (most recent call last):
  File "run.py", line 3, in <module>
    from config.pushbearConf import sendPushBear
  File "/home/sensetime/Desktop/vinny/tools_vin/12306-master/config/pushbearConf.py", line 4, in <module>
    from myUrllib.httpUtils import HTTPClient
  File "/home/sensetime/Desktop/vinny/tools_vin/12306-master/myUrllib/httpUtils.py", line 165
    print(f"url: {urls['req_url']}返回参数为空, 接口状态码: {response.status_code}")
                                                                                             ^
SyntaxError: invalid syntax

重现步骤 按照readme进行环境配置,pip install成功,并且再次pip install显示的是所有package都satisfied. 并且conda的环境是正确的。

环境信息

额外的备注

testerSunshine commented 5 years ago

这个语法3.6以上就支持了呀?我怀疑你使用了默认的2.7

AndyYuan96 commented 4 years ago

这个语法3.6以上就支持了呀?我怀疑你使用了默认的2.7

您好,我遇到了同样的错误,随后我直接测试了我的python支持这个语法。 $ python Python 3.7.2 (default, Dec 29 2018, 06:19:36) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information.

a = 1 print(f'{a}') 1