Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssl/buffering.rb:326:in `syswrite': Broken pipe (Errno::EPIPE) #10

Open
chirantan opened this issue Aug 6, 2014 · 2 comments
Open

Comments

@chirantan
Copy link

I'm on ruby 2.1.1. Your example below

require 'att_speech'
att_speech = ATTSpeech.new({ :api_key    => "my_api_key",
                             :secret_key => "my_secret_key",
                             :scope      => 'SPEECH'})

file_contents = File.read(File.expand_path(File.dirname(File.dirname(__FILE__))) + "/moon.wav")
p att_speech.speech_to_text(file_contents, type='audio/wav')

gives me an error.

/Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/openssl/buffering.rb:326:in `syswrite': Broken pipe (Errno::EPIPE)
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/openssl/buffering.rb:326:in `do_write'
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/openssl/buffering.rb:344:in `write'
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/protocol.rb:211:in `write0'
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/protocol.rb:185:in `block in write'
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/protocol.rb:202:in `writing'
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/protocol.rb:184:in `write'
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http/generic_request.rb:184:in `send_request_with_body'
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http/generic_request.rb:130:in `exec'
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1406:in `block in transport_request'
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1405:in `catch'
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1405:in `transport_request'
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1378:in `request'
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1371:in `block in request'
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:853:in `start'
from /Users/chirantan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1369:in `request'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/faraday-0.8.9/lib/faraday/adapter/net_http.rb:75:in `perform_request'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/faraday-0.8.9/lib/faraday/adapter/net_http.rb:38:in `call'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/faraday-0.8.9/lib/faraday/request/multipart.rb:13:in `call'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/faraday-0.8.9/lib/faraday/connection.rb:253:in `run_request'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/faraday-0.8.9/lib/faraday/connection.rb:118:in `post'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/att_speech-0.0.6/lib/att_speech/att_speech.rb:90:in `speech_to_text'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:26:in `public_send'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:26:in `dispatch'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:63:in `dispatch'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/celluloid-0.16.0.pre3/lib/celluloid/cell.rb:60:in `block in invoke'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/celluloid-0.16.0.pre3/lib/celluloid/cell.rb:71:in `block in task'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/celluloid-0.16.0.pre3/lib/celluloid/actor.rb:357:in `block in task'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/celluloid-0.16.0.pre3/lib/celluloid/tasks.rb:57:in `block in initialize'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/celluloid-0.16.0.pre3/lib/celluloid/tasks/task_fiber.rb:15:in `block in create'
from (celluloid):0:in `remote procedure call'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:92:in `value'
from /Users/chirantan/.rvm/gems/ruby-2.1.1@speech/gems/celluloid-0.16.0.pre3/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
from speech.rb:10:in `<main>'
@rreyes
Copy link

rreyes commented Jan 31, 2015

Did you have any luck in fixing this?

@dugjason
Copy link

A load of similar issues seem to suggest switching the Faraday default adapter to httpclient to resolve this issue:

Faraday.default_adapter = :httpclient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants