问题描述
上下文
-
是
export async function getServerSideProps(context) { const { id } = context.query console.log('getServerSideProps -> context.params',context.params,' context.query',context.query) // const res = await api.get(`/courses/${id}`) // const data = await res.data // console.log('getServerSideProps -> data',data) return { props: { MetaCourse: 'data' } } }
代码
Python 3.7.0
输出
期望图像将具有按顺序编号的名称(即image1.jpg image5.jpg image9.jpg等)
问题
代码工作到image9.jpg,然后在回溯过程中停止,错误为:
import os
import shutil
import glob
fps = 30
timer = 1 #in seconds
count = fps * timer + 1
#input and output file directory
src1 = glob.glob("./src/captured1.jpg")
dest = "./dst/"
#numbering start from 1 with increasing step of 4
for i in range(1,count,4):
for file_path in src1:
print(file_path)
shutil.copy(file_path,dest)
for filename in os.listdir(dest):
os.rename(os.path.join(dest,filename),os.path.join(dest,'image'+ str(i) + '.jpg'))
如何改进代码?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)