Giter VIP home page Giter VIP logo

Comments (6)

awelling2 avatar awelling2 commented on August 27, 2024

同样问题

from everydaywechat.

sfyc23 avatar sfyc23 commented on August 27, 2024

这个是 Python 3 的语法。

from everydaywechat.

awelling2 avatar awelling2 commented on August 27, 2024

用python3运行报yaml的错 尝试了一下Google的改法加loader=yaml.FullLoader运行还是报错······
root@Awelling:/home/Ea# python3 run.py
Traceback (most recent call last):
File "run.py", line 23, in
run()
File "run.py", line 11, in run
gfweather().run()
File "/home/Ea/GFWeather.py", line 22, in init
self.girlfriend_list, self.alarm_hour, self.alarm_minute, self.dictum_channel = self.get_init_data()
File "/home/Ea/GFWeather.py", line 30, in get_init_data
config = yaml.load(f, loader=yaml.FullLoader)
TypeError: load() got an unexpected keyword argument 'loader'

from everydaywechat.

sfyc23 avatar sfyc23 commented on August 27, 2024

用python3运行报yaml的错 尝试了一下Google的改法加loader=yaml.FullLoader运行还是报错······
root@Awelling:/home/Ea# python3 run.py
Traceback (most recent call last):
File "run.py", line 23, in
run()
File "run.py", line 11, in run
gfweather().run()
File "/home/Ea/GFWeather.py", line 22, in init
self.girlfriend_list, self.alarm_hour, self.alarm_minute, self.dictum_channel = self.get_init_data()
File "/home/Ea/GFWeather.py", line 30, in get_init_data
config = yaml.load(f, loader=yaml.FullLoader)
TypeError: load() got an unexpected keyword argument 'loader'

你单独运行一下 yaml 试试,可以是你环境的问题。

from everydaywechat.

lovejianglz avatar lovejianglz commented on August 27, 2024

python 好像 3.7 之后才支持 f“XXXX” 这种语法

from everydaywechat.

sfyc23 avatar sfyc23 commented on August 27, 2024

python 好像 3.7 之后才支持 f“XXXX” 这种语法

Python 3.6 以上就支持了。

from everydaywechat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.