This repository was archived by the owner on Dec 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
This repository was archived by the owner on Dec 21, 2023. It is now read-only.
.AVIF格式的图片似乎不支持 #30
Copy link
Copy link
Open
Description
您好,
在 挖巨坑、炸月亮、掉头发:《流浪地球2》的故事如何诞生
这期电台中, 时间轴第 9:46 所附的图片为 .avif
格式
以下为 data.json
相关节选:
....
{
"id": "213337",
"type": "timelines",
"attributes": {
"at": 586,
"title": "拍不出来",
"asset": "be294baaee4bb07ba5aedaaffb821b88.avif",
"content": "而敲定了大致剧本以后,在筹备期间遇到的问题就成了“这个拍不出来”或者“这别想了”。",
"quote-href": "",
"comments-count": 0
},
"relationships": {
"media": {},
"comments": {}
}
....
以下为报错相关节选:
....
Title: 早早定档
早在2020年,《流浪地
球2》就官宣定档于
2023的大年初一。
Traceback (most recent call last):
File "gcores.py", line 36, in <module>
main(int(title), skip_crawling, with_quote)
File "gcores.py", line 15, in main
Video.create_video(radio)
File "****/GadioVideo-master/gadio/media/video.py", line 32, in create_video
frame = Frame.create_page(radio.timeline[radio.timestamps[i]], radio)
File "****/GadioVideo-master/gadio/media/frame.py", line 74, in create_page
background_image = Frame.expand_frame(image, Frame.width, Frame.height)
File "****/GadioVideo-master/gadio/media/frame.py", line 174, in expand_frame
width_ratio = image.shape[1] / target_width
AttributeError: 'NoneType' object has no attribute 'shape'
运行至该处时会报错, 请问是否有临时解决方法? 直接修改 data.json
数据并替换图片似乎无法改变程序的运行
(经检查即使加了 -s
, data.json
修改后会还是会被改回去)
#设置 data.json 为只读之后的报错:
****/GadioVideo-master$ python gcores.py 161519 -s
Extracting information from 161519
{'categories': 1, 'medias': 1, 'timelines': 71, 'users': 3}
Traceback (most recent call last):
File "gcores.py", line 36, in <module>
main(int(title), skip_crawling, with_quote)
File "gcores.py", line 9, in main
parsed_json = Crawler.crawl(id)
File "****/GadioVideo-master/gadio/crawlers/crawler.py", line 45, in crawl
with open(cache_dir+os.sep+'data.json', 'w', encoding='utf-8') as outfile:
PermissionError: [Errno 13] Permission denied: './cache/161519/data.json'
如Rabbitism大大未来可加入对 .avif
的支持, 那就太感谢了
期待您的回复
Metadata
Metadata
Assignees
Labels
No labels