scraperwiki / xlsx-cgi

0 stars 0 forks source link

zip: write to closed file #5

Closed sean-duffy closed 10 years ago

sean-duffy commented 10 years ago

Write fails on box with the error zip: write to closed file, I have been unable to replicate this on my local machine. This appears to happen when the second sheet is being written.

pwaller commented 10 years ago

Is the error coming from here?

sean-duffy commented 10 years ago

No, from here.

pwaller commented 10 years ago

It could come about from SheetWriter.Close or SheetWriter.WriteHeader, or elsewhere. I've had a bit of a look and I don't immediately see the problem. Let me know if you want to chat face-to-face about it.

sean-duffy commented 10 years ago

The thing that's puzzling me is that if I run it locally, using the same CGI variables and the same database, it works fine.

pwaller commented 10 years ago

same go version? definitely compiling the same code?

sean-duffy commented 10 years ago

Same go version and same code, except of course darwin here and linux on the box. It's only the go version where I'm compiling that matters, right?

pwaller commented 10 years ago

That is pretty puzzling. I think the only thing for it is to instrument every place where streams are written to and closed and try and identify where the erroneous write to closed stream is coming from.

sean-duffy commented 10 years ago

Never mind, I found the problem. I hadn't git pulled in the xlsx repository on the box, I don't know how I didn't think of that! It works now so we can merge the pull request.

pwaller commented 10 years ago

Classic problem :)