pythonicrubyist / creek

Ruby library for parsing large Excel files.
http://rubygems.org/gems/creek
MIT License
388 stars 109 forks source link

No such file or directory @ rb_sysopen - /tmp/open-uri20220126-8-xdogjo #102

Closed leom806 closed 1 year ago

leom806 commented 2 years ago

Hey guys.

I was getting this error here when trying to read a XLSX spreadsheet remotely with 5k+ rows.

No such file or directory @ rb_sysopen - /tmp/open-uri20220126-8-xdogjo - Example error message

I'm not sure how that happens but I could fix it here by using your Creek::Book#download_file method like this:

image

I'm basically downloading the file locally but what really did the change was to not call the path method in the Tempfile.new without an instance variable.

Looks like some Garbage Collection issue, not sure.

I thought that would help. Thanks for your great work.

stiig commented 2 years ago

@leom806 I had the same issue, try to unlink file after processing, for more details - https://www.hilman.io/blog/2016/01/tempfile/