From: Russell O. <ro...@uw...> - 2014-10-09 19:49:59
|
The command http::geturl -channel is broken on MacOS 10.9.5 (and likely other versions). Transfers fail while writing to the channel with "resource temporarily unavailable". Transfers seem to work if -channel not specified. I have appended a simple example and posted a bug report <http://core.tcl.tk/tcl/tktview/ed29c4da21f4c0a7858a0f5ae4aae20dd42fc818> If anyone knows of a reasonable workaround, that would be great. I can almost certainly use a progress callback to manually write the data (and thus avoid using a channel) but unless there is some way to purge the data from the state array after writing it, that would fail on large files. (I see how to read the data, but not purge it.) 8.5.16 does fix the menu crashing bug that prevented me from updating past 8.5.11, but unfortunately this new bug is a show-stopper. -- Russell package require http set outname "saturn.jpg" set url "http://apod.nasa.gov/apod/image/1409/saturnequinox_cassini_7227.jpg" set out [open "temp" w] set token [::http::geturl $url -channel $out] close $out package require http On MacOS with ActiveState Tcl 8.5.16 I see: Error in startup script: error reading "sock8": resource temporarily unavailable while executing "::http::geturl $url -channel $out" invoked from within "set token [::http::geturl $url -channel $out]" (file "tcl http example.tcl" line 6) |
From: Kevin W. <kw...@co...> - 2014-10-09 21:50:04
|
Russell, On 10/9/14, 3:49 PM, Russell Owen wrote: > package require http > > set outname "saturn.jpg" > set url > "http://apod.nasa.gov/apod/image/1409/saturnequinox_cassini_7227.jpg" > set out [open "temp" w] > set token [::http::geturl $url -channel $out] > close $out I see the bug, but have no idea what the problem is--I don't maintain the http package and so wouldn't know where to begin debugging it. Any reason you are using a Tcl call instead of something from Python, cf. urllib? --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com |
From: Andreas K. <and...@ac...> - 2014-10-09 21:59:13
|
The ticket at core is http://core.tcl.tk/tcl/tktview/ed29c4da21f4c0a7858a0f5ae4aae20dd42fc818 On Thu, Oct 9, 2014 at 2:49 PM, Kevin Walzer <kw...@co...> wrote: > Russell, > > On 10/9/14, 3:49 PM, Russell Owen wrote: >> package require http >> >> set outname "saturn.jpg" >> set url >> "http://apod.nasa.gov/apod/image/1409/saturnequinox_cassini_7227.jpg" >> set out [open "temp" w] >> set token [::http::geturl $url -channel $out] >> close $out > > I see the bug, but have no idea what the problem is--I don't maintain > the http package and so wouldn't know where to begin debugging it. > > Any reason you are using a Tcl call instead of something from Python, > cf. urllib? > > --Kevin > > -- > Kevin Walzer > Code by Kevin/Mobile Code by Kevin > http://www.codebykevin.com > http://www.wtmobilesoftware.com > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > _______________________________________________ > Tcl-mac mailing list > tc...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-mac -- Andreas Kupries Senior Tcl Developer Code to Cloud: Smarter, Safer, Faster™ F: 778.786.1133 and...@ac..., http://www.activestate.com Learn about Stackato for Private PaaS: http://www.activestate.com/stackato 21'st Tcl/Tk Conference: Nov 10-14, Portland, OR, USA -- http://www.tcl.tk/community/tcl2014/ Send mail to tcl...@go..., by Sep 8 Registration is open. |
From: Kevin W. <kw...@co...> - 2014-10-09 22:48:03
|
Andreas, On 10/9/14, 5:59 PM, Andreas Kupries wrote: > The ticket at core is > http://core.tcl.tk/tcl/tktview/ed29c4da21f4c0a7858a0f5ae4aae20dd42fc818 Thanks for doing more testing and tracking down the regression. I'm sure a fix will be committed soon. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com |
From: Andreas K. <and...@ac...> - 2014-10-09 22:51:26
|
Heh, just wanted to say that the bisection points to a checkin made Aug 22 and the ticket has been assigned to the person who made that commit. Together with a name for the original submitter of the change in itself it should be possible to get this fixed. Russel should see all the notification mails directly. On Thu, Oct 9, 2014 at 3:47 PM, Kevin Walzer <kw...@co...> wrote: > Andreas, > > On 10/9/14, 5:59 PM, Andreas Kupries wrote: >> >> The ticket at core is >> >> http://core.tcl.tk/tcl/tktview/ed29c4da21f4c0a7858a0f5ae4aae20dd42fc818 > > > Thanks for doing more testing and tracking down the regression. I'm sure a > fix will be committed soon. > > > --Kevin > > -- > Kevin Walzer > Code by Kevin/Mobile Code by Kevin > http://www.codebykevin.com > http://www.wtmobilesoftware.com -- Andreas Kupries Senior Tcl Developer Code to Cloud: Smarter, Safer, Faster™ F: 778.786.1133 and...@ac..., http://www.activestate.com Learn about Stackato for Private PaaS: http://www.activestate.com/stackato 21'st Tcl/Tk Conference: Nov 10-14, Portland, OR, USA -- http://www.tcl.tk/community/tcl2014/ Send mail to tcl...@go..., by Sep 8 Registration is open. |
From: Russell O. <ro...@uw...> - 2014-10-14 17:11:40
|
On 10/9/14 2:49 PM, Kevin Walzer wrote: > Russell, > > On 10/9/14, 3:49 PM, Russell Owen wrote: >> package require http >> >> set outname "saturn.jpg" >> set url >> "http://apod.nasa.gov/apod/image/1409/saturnequinox_cassini_7227.jpg" >> set out [open "temp" w] >> set token [::http::geturl $url -channel $out] >> close $out > > I see the bug, but have no idea what the problem is--I don't maintain > the http package and so wouldn't know where to begin debugging it. > > Any reason you are using a Tcl call instead of something from Python, > cf. urllib? It is a Tkinter application (naturally) and I want to display the progress of the download. Is it possible to safely do this with a Python http library? If so, that does sound like the best solution. For the record: the Tcl community jumped on this bug and fixed it for 8.5 and 8.6. I was very impressed! -- Russell |