GithubHelp home page GithubHelp logo

Comments (4)

ShangDongChu avatar ShangDongChu commented on June 10, 2024 1

感谢反馈,我修改一下代码,返回提示信息而不是报错

很感谢您的这个项目, 这个问题可以修复吗?
因为即使点数用完了,在网页里image creator也是可以继续生成的,只是所花费的时间更多.
我尝试了修复,但是发现:(1)有点数余额的时候,session.post()得到的返回response中有重定向到生成图片的 response.headers["Location"].(2)当点数用尽的时候,即使session.post()发送相同的请求,response中也没有重定向的response.headers["Location"],但是会有一个待生成图片的id: response.headers["X-Ceto-ref"],但是这个id是无效的,服务器并没有真正生成这张图片.(3)当点数用尽时,在网页端生成是可以正常重定向的.
尝试修复了一下午,还是没有成功,希望以上信息对您有帮助.

from bing_brush.

ShangDongChu avatar ShangDongChu commented on June 10, 2024 1

Hi @HumphreyB613 , 您好,感谢您花时间使用和调试这个工具,您的调试信息对最终解决问题很有帮助,我照着您的思路,发现没有返回Location是因为post请求中有一个参数rt,默认用的是4,如果boosts用完后,rt=4的post请求就不返回Location,因此需要改成rt=3(走慢速通道)再发送请求,然后就可以生成了,虽然时间确实会增加。

基于这个解决方案,我提交了更新代码,也在pypi上发布了0.1.2版本,欢迎您继续使用,如果有任何问题可以继续讨论:)

您好,非常感谢您的付出! 这是很棒的项目!

from bing_brush.

vra avatar vra commented on June 10, 2024

感谢反馈,我修改一下代码,返回提示信息而不是报错

from bing_brush.

vra avatar vra commented on June 10, 2024

Hi @HumphreyB613 ,
您好,感谢您花时间使用和调试这个工具,您的调试信息对最终解决问题很有帮助,我照着您的思路,发现没有返回Location是因为post请求中有一个参数rt,默认用的是4,如果boosts用完后,rt=4的post请求就不返回Location,因此需要改成rt=3(走慢速通道)再发送请求,然后就可以生成了,虽然时间确实会增加。

基于这个解决方案,我提交了更新代码,也在pypi上发布了0.1.2版本,欢迎您继续使用,如果有任何问题可以继续讨论:)

from bing_brush.

Related Issues (4)

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.