Open LeeSen11 opened 8 months ago
不好意思我也不知道,这个来自朋友的朋友圈。我先把这个 issue 改个名字哈,等我知道了回复你
感谢大佬🙏🙂
我的这个BingImageCreator 一直报错 代码如下( 从https://github.com/iamshaynez/xiaowenz-daily/blob/main/daily.py fork的,代码比你的简单点):
from BingImageCreator import ImageGen
def make_pic_from_bing(sentence, bing_cookie):
# for bing image when dall-e3 open drop this function
i = ImageGen(bing_cookie)
images = i.get_images(sentence)
return images, "Image Powered by Bing DALL.E-3"
# try Dalle-3 from Bing first, then OpenAI Image API
def make_pic(sentence):
if BING_COOKIE is not None and BING_COOKIE != '':
try:
images, image_comment = make_pic_from_bing(sentence, BING_COOKIE)
return images[0], image_comment
except Exception as e:
print(f'Image generated from Bing failed: {type(e)}')
print(type(e), e)
else:
print('Bing Cookie is not set. Use OpenAI to generate Image')
image_url, image_comment = make_pic_from_openai(sentence)
return image_url, image_comment
错误如下
Image generated from Bing failed: <class 'requests.exceptions.MissingSchema'>
<class 'requests.exceptions.MissingSchema'> Invalid URL '/images/create?q=%E6%9C%89%E7%86%8A%E6%9C%89%E7%BD%B4%[20](https://github.com/burndown/bd-daily/actions/runs/7043888830/job/19170493007#step:5:21)%E6%9C%89%E7%8C%AB%E6%9C%89%E8%99%8E%20%E5%BA%86%E6%97%A2%E4%BB%A4%E5%B1%85%20%E9%9F%A9%E5%A7%9E%E7%87%95%E8%AA%89%20&rt=4&FORM=GENCRE': No scheme supplied. Perhaps you meant https:///images/create?q=%E6%9C%89%E7%86%8A%E6%9C%89%E7%BD%B4%20%E6%9C%89%E7%8C%AB%E6%9C%89%E8%99%8E%20%E5%BA%86%E6%97%A2%E4%BB%A4%E5%B1%85%20%E9%9F%A9%E5%A7%9E%E7%87%95%E8%AA%89%20&rt=4&FORM=GENCRE?
这个会是那里的原因呢?感觉不是cookie的问题,像是HTTP请求构建有问题?
我的这个BingImageCreator 一直报错 代码如下( 从https://github.com/iamshaynez/xiaowenz-daily/blob/main/daily.py fork的,代码比你的简单点):
from BingImageCreator import ImageGen def make_pic_from_bing(sentence, bing_cookie): # for bing image when dall-e3 open drop this function i = ImageGen(bing_cookie) images = i.get_images(sentence) return images, "Image Powered by Bing DALL.E-3" # try Dalle-3 from Bing first, then OpenAI Image API def make_pic(sentence): if BING_COOKIE is not None and BING_COOKIE != '': try: images, image_comment = make_pic_from_bing(sentence, BING_COOKIE) return images[0], image_comment except Exception as e: print(f'Image generated from Bing failed: {type(e)}') print(type(e), e) else: print('Bing Cookie is not set. Use OpenAI to generate Image') image_url, image_comment = make_pic_from_openai(sentence) return image_url, image_comment
错误如下
Image generated from Bing failed: <class 'requests.exceptions.MissingSchema'> <class 'requests.exceptions.MissingSchema'> Invalid URL '/images/create?q=%E6%9C%89%E7%86%8A%E6%9C%89%E7%BD%B4%[20](https://github.com/burndown/bd-daily/actions/runs/7043888830/job/19170493007#step:5:21)%E6%9C%89%E7%8C%AB%E6%9C%89%E8%99%8E%20%E5%BA%86%E6%97%A2%E4%BB%A4%E5%B1%85%20%E9%9F%A9%E5%A7%9E%E7%87%95%E8%AA%89%20&rt=4&FORM=GENCRE': No scheme supplied. Perhaps you meant https:///images/create?q=%E6%9C%89%E7%86%8A%E6%9C%89%E7%BD%B4%20%E6%9C%89%E7%8C%AB%E6%9C%89%E8%99%8E%20%E5%BA%86%E6%97%A2%E4%BB%A4%E5%B1%85%20%E9%9F%A9%E5%A7%9E%E7%87%95%E8%AA%89%20&rt=4&FORM=GENCRE?
这个会是那里的原因呢?感觉不是cookie的问题,像是HTTP请求构建有问题?
url 不对,需要把前面 http 啥的加上
加上BING_LINK确实好了。
非常奇怪了,我看BingImageCreator 里有默认值,不知道为啥没带到这里来。
多谢多谢,我终于有自己的每日图片了
加上BING_LINK确实好了。
非常奇怪了,我看BingImageCreator 里有默认值,不知道为啥没带到这里来。
多谢多谢,我终于有自己的每日图片了
不客气
纯路过,我也朋友圈发过这句话
纯路过,我也朋友圈发过这句话
cool
主页的这种图片的字体非常好看,这个字体的名字叫啥呀?