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

packable error #500

Closed
kojix2 opened this issue Mar 20, 2019 · 5 comments
Closed

packable error #500

kojix2 opened this issue Mar 20, 2019 · 5 comments

Comments

@kojix2
Copy link
Member

kojix2 commented Mar 20, 2019

code

d1.rb

require 'daru'

df = Daru::DataFrame.new(a: [1,2,3], b:[4,5,6])
df.each(:row) { |i| puts i }

terminal

ruby d1.rb

error

/home/kojix2/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/packable-1.3.10/lib/packable/extensions/io.rb:86:in `pos': Illegal seek @ rb_io_tell - <STDOUT> (Errno::ESPIPE)
	from /home/kojix2/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/packable-1.3.10/lib/packable/extensions/io.rb:86:in `pack_and_write'
	from /home/kojix2/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/packable-1.3.10/lib/packable/extensions/io.rb:62:in `write_with_packing'
	from d1.rb:4:in `puts'
	from d1.rb:4:in `puts'
	from d1.rb:4:in `block in <main>'
	from /home/kojix2/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/daru-0.2.1/lib/daru/dataframe.rb:804:in `block in each_row'
	from /home/kojix2/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/daru-0.2.1/lib/daru/dataframe.rb:803:in `times'
	from /home/kojix2/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/daru-0.2.1/lib/daru/dataframe.rb:803:in `each_row'
	from /home/kojix2/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/daru-0.2.1/lib/daru/dataframe.rb:2489:in `dispatch_to_axis'
	from /home/kojix2/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/daru-0.2.1/lib/daru/dataframe.rb:834:in `each'
	from d1.rb:4:in `<main>'
@kojix2 kojix2 closed this as completed Mar 20, 2019
@Shekharrajak
Copy link
Member

@kojix2 , You were using Ruby < 2.5 ?

@kojix2
Copy link
Member Author

kojix2 commented Mar 28, 2019

@Shekharrajak
Ruby 2.6.1.
This error does not always occur on any PC.
I decided to close the issue because I thought it was not a problem with Ruby but an interference with the environment.

@Shekharrajak
Copy link
Member

Yes! This problem will come when Ruby version > 2.4 .

@Shekharrajak
Copy link
Member

Similar issue : #503

@Nakilon
Copy link

Nakilon commented Sep 1, 2021

Excuse me guys but I see three issues all linked to each other but I don't see the actual code patch. Am I blind?
I get this exact exception in my not related gem and google doesn't say much about it, only leads here. I get it when I call .pos on stdout instance in some specific case within popen. I need it to count how much I've printed.

UPD:

$ ruby -e "p STDOUT.pos"
17800074
$ ruby -ropen3 -e "p Open3.capture2e 'ruby -e \"p STDOUT.pos\"'"
["-e:1:in `pos': Illegal seek @ rb_io_tell - <STDOUT> (Errno::ESPIPE)\n\tfrom -e:1:in `<main>'\n", #<Process::Status: pid 83602 exit 1>]

(the same on ruby 2.3.8 and 3.0.1)

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