Bug trying to download Etoys projects from a XO laptop

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug trying to download Etoys projects from a XO laptop

Bruno Sperb
Hey all,

Im Bruno, from Porto Alegre, Brazil. Im writing to tell you about a specific problem im facing, and see if you guys can help me with it.
We are currently working with a group of students on weekly workshops (they have XOs laptops, running SUGAR), and want to leave them challenges (etoys projects) on the web for them to download at home (as well as getting them to upload their projects). We are using an environment called pbworks, wich works pretty much as a regular wiki page, where each student has their own page.

- Bug downloading projects in the XO:

We left a link on a wiki page just like shown on the picture below:


Once you click on the link, it downloads to the sugar´s journal as: Arquivo 1255_cachorros.001.pr de http://etoysnodinah.pbworks.com/f/1255_cachorros.001.pr

I then tried opening in Etoys both from the journal, copying to clipboard or from Etoys, getting the same message (it seems, to me, that Etoys is opening it as a .html file, but it is really dificult to understand, as I dont know much about the codes)



When uploading a .pr file from the XO, it does alrigth, although changing the file .pr name to a .tmp. I can download and open the file normally from a regular laptop, but when try from the XO, the same problem as explained above happens.

Any idea what I am doing wrong?

Thanks a lot in advance,

all the best,

Bruno Sperb

LEC's Team (UFRGS/PORTO ALEGRE/BRAZIL)

ps: I am constantly following the Xo discussions lists, but could not get an answer to this problem...








Em 30/05/2011 05:31, [hidden email] escreveu:
Send etoys-dev mailing list submissions to
	[hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.squeakland.org/mailman/listinfo/etoys-dev
or, via email, send a message with subject or body 'help' to
	[hidden email]

You can reach the person managing the list at
	[hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of etoys-dev digest..."


Today's Topics:

   1. Etoys Inbox: Monticello-kfr.405.mcz ([hidden email])
   2. Etoys Inbox: Monticello-kfr.408.mcz ([hidden email])
   3. Re: Test new 4.1.2 alpha (Bert Freudenberg)


----------------------------------------------------------------------

Message: 1
Date: Mon, 30 May 2011 04:21:47.095 0000
From: [hidden email]
To: [hidden email]
Subject: [etoys-dev] Etoys Inbox: Monticello-kfr.405.mcz
Message-ID: [hidden email]

A new version of Monticello was added to project Etoys Inbox:
http://source.squeak.org/etoysinbox/Monticello-kfr.405.mcz

==================== Summary ====================

Name: Monticello-kfr.405
Author: kfr
Time: 30 May 2011, 6:21:41 am
UUID: 8ad3427e-ec11-c049-b9af-61a7564b86af
Ancestors: Monticello-kfr.404

Add repository password and user intitials if missing

=============== Diff against Monticello-kfr.403 ===============

Item was changed:
  ----- Method: MCHttpRepository>>writeStreamForFileNamed:replace:do: (in category 'required') -----
  writeStreamForFileNamed: aString replace: ignoreBoolean do: aBlock
  	| stream response statusLine code |
  	stream := RWBinaryOrTextStream on: String new.
  	aBlock value: stream.
  	self displayProgress: 'Uploading ', aString during:[
  		response := HTTPSocket
  					httpPut: stream contents
  					to: (self urlForFileNamed: aString)
  					user: self user
  					passwd: self password.
  	].
  	"More robust handling of HTTP responses. Instead of enumerating
  	all possible return codes and http versions, do a quick parse"
  	(response beginsWith: 'HTTP/') ifTrue:[
  		"Looks like an HTTP header, not some error message"
  		statusLine := response copyUpTo: Character cr.
  		code := [(statusLine findTokens: ' ') second asInteger] on: Error do:[].
  	].
  	(code isInteger and:[code between: 200 and: 299]) 
+ 		ifFalse:[	(code isInteger and:[code = 401]) 
+ 							ifTrue:[MCWorkingCopyBrowser editRepository. self storeVersion:aString]
+ 	                             ifFalse:[self error: response]].!
- 		ifFalse:[self error: response].!



------------------------------

Message: 2
Date: Mon, 30 May 2011 04:44:59.476 0000
From: [hidden email]
To: [hidden email]
Subject: [etoys-dev] Etoys Inbox: Monticello-kfr.408.mcz
Message-ID: [hidden email]

A new version of Monticello was added to project Etoys Inbox:
http://source.squeak.org/etoysinbox/Monticello-kfr.408.mcz

==================== Summary ====================

Name: Monticello-kfr.408
Author: kfr
Time: 30 May 2011, 6:44:54 am
UUID: 8b39e6d7-6aa6-fd43-9d62-dac73740638a
Ancestors: Monticello-kfr.407

Revert

=============== Diff against Monticello-kfr.405 ===============

Item was changed:
  ----- Method: MCHttpRepository>>writeStreamForFileNamed:replace:do: (in category 'required') -----
  writeStreamForFileNamed: aString replace: ignoreBoolean do: aBlock
  	| stream response statusLine code |
  	stream := RWBinaryOrTextStream on: String new.
  	aBlock value: stream.
  	self displayProgress: 'Uploading ', aString during:[
  		response := HTTPSocket
  					httpPut: stream contents
  					to: (self urlForFileNamed: aString)
  					user: self user
  					passwd: self password.
  	].
  	"More robust handling of HTTP responses. Instead of enumerating
  	all possible return codes and http versions, do a quick parse"
  	(response beginsWith: 'HTTP/') ifTrue:[
  		"Looks like an HTTP header, not some error message"
  		statusLine := response copyUpTo: Character cr.
  		code := [(statusLine findTokens: ' ') second asInteger] on: Error do:[].
  	].
  	(code isInteger and:[code between: 200 and: 299]) 
+ 		ifFalse:[self error: response].!
- 		ifFalse:[	(code isInteger and:[code = 401]) 
- 							ifTrue:[MCWorkingCopyBrowser editRepository. self storeVersion:aString]
- 	                             ifFalse:[self error: response]].!



------------------------------

Message: 3
Date: Mon, 30 May 2011 10:31:41 +0200
From: Bert Freudenberg [hidden email]
To: etoys dev [hidden email]
Subject: Re: [etoys-dev] Test new 4.1.2 alpha
Message-ID: [hidden email]
Content-Type: text/plain; charset="us-ascii"

On 30.05.2011, at 05:36, karl ramberg wrote:

On Mon, May 30, 2011 at 1:14 AM, Bert Freudenberg [hidden email] wrote:
I created a 4.1.2 alpha 3:

       http://etoys.squeak.org/download/4.1/Etoys-To-Go-4.1.2-alpha3.zip

Xin Wang: this should have the new home project.

Everything is committed to SVN, including the notes in what I did. The release-howto now also describes how to build the image, update the translations, and make an Etoys-To-Go zip file. Sorry, no screencast this time ;)
I'll read trough this.


I updated the NEWS file but left filling in the details of 4.1.2391 to you:

       http://etoys.squeak.org/svn/trunk/Etoys/NEWS

(I was surprised anyone thought UML is a good thing to add to the Basic category of the object catalog)

Steve wanted the Notice as a kind of postIts to use in projects.
But does it have to be in "Basic"? Also, Steve by now is an advanced user, he sure knows where to find it if he needs it?

In the German translation, that object is called "UML-Notiz". I bet not many of our users know or care what UML is. Looks rather jarring on the first page of a tool aimed at children and teachers:



I'd rather not add features at all in a bug-fix release. Making things easier to access might count as bug fix, so I won't object. But please put it in the Connectors category where it belongs.

Also, when you try to run the ReleaseBuilder it will complain that the NOTICE file does not match the in-image copyright notice. To fix that you simply need to change the copyright methods to look the same as that file. I did not want to spend time on it today.

I will look at that

Also,  Alpha2 have a updated version of project ParticleDyeInWater and the video to that project.

Karl
Ah. Please commit it to the subversion repository. It's the same username/password as for the update stream.

- Bert -


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20110530/970c4916/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-2.png
Type: image/png
Size: 26281 bytes
Desc: not available
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20110530/970c4916/attachment.png>

------------------------------

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev


End of etoys-dev Digest, Vol 57, Issue 33
*****************************************


_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: Bug trying to download Etoys projects from a XO laptop

Bert Freudenberg
Hi Bruno,

I will cc the Sugar list because is more of a Sugar problem than an Etoys problem.

I tried downloading your http://etoysnodinah.pbworks.com/f/1255_cachorros.001.pr

As far as I can tell, it is not working correctly because your server sends the content type "application/x-pr". This is the header I see:

HTTP/1.1 200 OK
Server: nginx/0.6.32
Date: Mon, 30 May 2011 19:12:59 GMT
Content-Type: application/x-pr
Connection: keep-alive
Set-Cookie: pbj=93a79c8d2090521fc389959c8d04001306782779; expires=Fri, 01-Jan-2038 00:00:00 GMT; path=/; domain=.pbworks.com
Content-Disposition: attachment; filename="1255_cachorros.001.pr"
Cache-Control: public, max-age=3600
Expires: Mon, 30 May 2011 20:12:59 GMT
Last-Modified: Tue, 17 May 2011 20:43:53 GMT
Accept-Ranges: bytes
Content-Length: 48104

This content type is unknown to Sugar, so it stores it as a generic "data" entry in the Journal. The entry does not have an Etoys icon. Also, in the entry's details page in the Journal, it shows the type as application/x-pr.

Now, when opening that file, Sugar does not use the original file name. It creates a new file name with a ".htm" extension (I have no idea why "htm"). Etoys sees that .htm file extension and displays the file in a text window, because it does not guess it is a project.

Unfortunately, there is no way to adjust the type of a Journal entry in the detail view. There may be some command line magic, but it is not trivial AFAIK. The real fix is to change the content type on your server.

FIX: Change the content type for ".pr" files on the server to "application/octet-stream". If Sugar sees that type, it will try to guess the right type from the file extension, and mark it correctly as Etoys project.

(this is usually better than using the actual MIME type for Etoys projects because it simply forces a download of the project)

Hope that helps,

- Bert -

On 30.05.2011, at 17:06, Bruno Sperb wrote:

> Hey all,
>
> Im Bruno, from Porto Alegre, Brazil. Im writing to tell you about a specific problem im facing, and see if you guys can help me with it.
> We are currently working with a group of students on weekly workshops (they have XOs laptops, running SUGAR), and want to leave them challenges (etoys projects) on the web for them to download at home (as well as getting them to upload their projects). We are using an environment called pbworks, wich works pretty much as a regular wiki page, where each student has their own page.
>
> - Bug downloading projects in the XO:
>
> We left a link on a wiki page just like shown on the picture below:
> <linkwikipage.png>
>
> Once you click on the link, it downloads to the sugarĀ“s journal as: Arquivo 1255_cachorros.001.pr de http://etoysnodinah.pbworks.com/f/1255_cachorros.001.pr
>
> I then tried opening in Etoys both from the journal, copying to clipboard or from Etoys, getting the same message (it seems, to me, that Etoys is opening it as a .html file, but it is really dificult to understand, as I dont know much about the codes)
>
> <testdownload.png>
>
> When uploading a .pr file from the XO, it does alrigth, although changing the file .pr name to a .tmp. I can download and open the file normally from a regular laptop, but when try from the XO, the same problem as explained above happens.
>
> Any idea what I am doing wrong?
>
> Thanks a lot in advance,
>
> all the best,
>
> Bruno Sperb
>
> LEC's Team (UFRGS/PORTO ALEGRE/BRAZIL)
>
> ps: I am constantly following the Xo discussions lists, but could not get an answer to this problem...


_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev