Giter VIP home page Giter VIP logo

Comments (8)

hmage avatar hmage commented on May 20, 2024

Same here. Sending photos does not work anymore. This happened after updating all gems.

Output of bundle show below:

$ bundle show
Gems included by the bundle:
  * axiom-types (0.1.1)
  * bundler (1.7.4)
  * coercible (1.0.0)
  * descendants_tracker (0.0.4)
  * equalizer (0.0.11)
  * gene_pool (1.4.1)
  * httmultiparty (0.3.16)
  * httparty (0.13.7)
  * ice_nine (0.11.1)
  * json (1.8.1)
  * mimemagic (0.3.1)
  * multi_xml (0.5.5)
  * multipart-post (2.0.0)
  * persistent_http (1.0.6)
  * persistent_httparty (0.1.2)
  * telegram-bot-ruby (0.4.0)
  * thread_safe (0.3.5)
  * virtus (1.0.5)

from telegram-bot-ruby.

markkuit avatar markkuit commented on May 20, 2024

Same here. I'm getting a different error but it happens when sending photo/documents.

/usr/local/share/gems/gems/persistent_http-1.0.6/lib/persistent_http.rb:335:in rescue in block in request': too many connection resets (due to end of file reached - EOFError)`

Every gem is up-to-date.

EDIT: just to be sure, same behavior happens with example code and on two different machines on two far away networks.

from telegram-bot-ruby.

zeracode avatar zeracode commented on May 20, 2024

I solved the problem for myself (telegram-bot-ruby 0.4.0) as follows:

class Telegram::Bot::Api
  private 
  def jsonify_inline_query_results(value)
    return value unless value.class == Array
    return value unless Array(value).all? { |i| INLINE_QUERY_RESULT_TYPES.include?(i.class) }
    value.map { |i| i.to_h.select { |_, v| v } }.to_json
  end
end

from telegram-bot-ruby.

atipugin avatar atipugin commented on May 20, 2024

@zeracode yeah, the issue was exactly here, thanks. I've released 0.4.1 with fix. Please update the gem.

from telegram-bot-ruby.

AbdullahAs avatar AbdullahAs commented on May 20, 2024

Same issue here, I have v0.5.2

from telegram-bot-ruby.

atipugin avatar atipugin commented on May 20, 2024

Please show your code.

from telegram-bot-ruby.

AbdullahAs avatar AbdullahAs commented on May 20, 2024

Alright after looking for other closed issue it appears that we have to use now the Faraday::UploadIO.new instead of File.new which caused the issue in a code that was running just fine before.
Maybe it would be a good idea if this change was highlighted with few details in the changelog. Thanks.

from telegram-bot-ruby.

atipugin avatar atipugin commented on May 20, 2024

It is highlighted in README.

from telegram-bot-ruby.

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.