Sgf downloads in eidogo broken.

Is something wrong? Do you have any suggestions? Let us know.
User avatar
CarlJung
Lives in gote
Posts: 429
Joined: Wed Apr 21, 2010 1:10 pm
Rank: SDK
GD Posts: 0
KGS: CarlJung
Location: Sweden
Has thanked: 101 times
Been thanked: 73 times

Sgf downloads in eidogo broken.

Post by CarlJung »

See Bills review here:
http://lifein19x19.com/forum/viewtopic.php?p=3134#p3134

I click "Download SGF" but the resulting file is not the correct sgf. It ends prematurely. The eidogo player on the page has the comment "End of comment" at move 143. That comment is not in the downloaded file. Please help me enjoy Bills awesomeness in a downloaded sgf.
User avatar
ChradH
Dies with sente
Posts: 106
Joined: Wed Apr 21, 2010 8:40 am
Rank: EGF 8k
GD Posts: 0
Universal go server handle: ChradH
Location: Germany
Has thanked: 64 times
Been thanked: 7 times

Re: Sgf downloads in eidogo broken.

Post by ChradH »

The sgf ends prematurely after "die big " in comment for move #87.

Code: Select all

better to live small than die big <img src="./images/smilies/icon_e_smile.gif" alt=":-)" title="Smile">

Nope. It is better to live big. See variation.

Must be the img tag.
To sig or not to sig, that is the question.
User avatar
CarlJung
Lives in gote
Posts: 429
Joined: Wed Apr 21, 2010 1:10 pm
Rank: SDK
GD Posts: 0
KGS: CarlJung
Location: Sweden
Has thanked: 101 times
Been thanked: 73 times

Re: Sgf downloads in eidogo broken.

Post by CarlJung »

Yes, looks like it. See move 87. Smileys should not be converted to images inside sgf tags. Admins, pls help.
User avatar
ChradH
Dies with sente
Posts: 106
Joined: Wed Apr 21, 2010 8:40 am
Rank: EGF 8k
GD Posts: 0
Universal go server handle: ChradH
Location: Germany
Has thanked: 64 times
Been thanked: 7 times

Re: Sgf downloads in eidogo broken.

Post by ChradH »

Test: My attempt at salvaging the sgf (downloadable with one minor glitch, see below)



My analysis so far: the first sgf posted contained a smiley

Code: Select all

:-)
at move 87. Upon downloading, it gets expanded into HTML with some angle brackets. When this gets posted again, it is not downloadable.

Another issue: The plus sign in the sgf result tag

Code: Select all

[W+43.5]
gets converted into a space (url encoding?), resulting in a warning when opening the file in cgoban3.
Last edited by ChradH on Thu Apr 29, 2010 2:54 pm, edited 1 time in total.
To sig or not to sig, that is the question.
User avatar
CarlJung
Lives in gote
Posts: 429
Joined: Wed Apr 21, 2010 1:10 pm
Rank: SDK
GD Posts: 0
KGS: CarlJung
Location: Sweden
Has thanked: 101 times
Been thanked: 73 times

Re: Sgf downloads in eidogo broken.

Post by CarlJung »

You're awesome. How did you do that? Do you have admin powers?
User avatar
ChradH
Dies with sente
Posts: 106
Joined: Wed Apr 21, 2010 8:40 am
Rank: EGF 8k
GD Posts: 0
Universal go server handle: ChradH
Location: Germany
Has thanked: 64 times
Been thanked: 7 times

Re: Sgf downloads in eidogo broken.

Post by ChradH »

No special powers here :-)
Copied it from the page's source code, then did some search-and-replace of HTML artefacts like <BR/>, &#40; and so on.
To sig or not to sig, that is the question.
User avatar
fwiffo
Gosei
Posts: 1435
Joined: Tue Apr 20, 2010 6:22 am
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
Location: California
Has thanked: 49 times
Been thanked: 168 times

Re: Sgf downloads in eidogo broken.

Post by fwiffo »

Looks like two bugs. One is URL encoding as ChradH suggested. That's pretty easy to fix. The other is harder. BBcodes can't be told not to mangle their contents, so the best I can do is unmangle them. I have to strip out extra <br> tags for instance. Looks like I'll have to do some others as well.

I'll add them to my todo list (probably won't be able to take care of them until the weekend).
User avatar
fwiffo
Gosei
Posts: 1435
Joined: Tue Apr 20, 2010 6:22 am
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
Location: California
Has thanked: 49 times
Been thanked: 168 times

Re: Sgf downloads in eidogo broken.

Post by fwiffo »

OK, partial fix in place. One problem is that the download thingy passes the SGF data to the server as a GET parameter in a URL, and there is a length limit. SGF files usually come in under it, but not always. So there is a size limit on SGF files that are embedded inline as text. I plan to work around that by POSTing the data to the server, but that's going to require more work.

There are a lot less problems when you embed them by URL (no weird encoding things, no weird download hack, etc.), but I know not everybody has web space to upload SGF files to. But I just made a small change that lets you embed SGF files that are attached to your post, which should be way more convenient than loading it up in a text editor and copying and pasting the code.

Code: Select all

[sgf-full]http://lifein19x19.com/forum/download/file.php?id=35[/sgf-full]

[sgf-full]http://lifein19x19.com/forum/download/file.php?id=35[/sgf-full]
Attachments
muchen1999-TheCaptain.sgf
(13.66 KiB) Downloaded 776 times
User avatar
CarlJung
Lives in gote
Posts: 429
Joined: Wed Apr 21, 2010 1:10 pm
Rank: SDK
GD Posts: 0
KGS: CarlJung
Location: Sweden
Has thanked: 101 times
Been thanked: 73 times

Re: Sgf downloads in eidogo broken.

Post by CarlJung »

fwiffo wrote:OK, partial fix in place. One problem is that the download thingy passes the SGF data to the server as a GET parameter in a URL, and there is a length limit. SGF files usually come in under it, but not always. So there is a size limit on SGF files that are embedded inline as text. I plan to work around that by POSTing the data to the server, but that's going to require more work.

There are a lot less problems when you embed them by URL (no weird encoding things, no weird download hack, etc.), but I know not everybody has web space to upload SGF files to. But I just made a small change that lets you embed SGF files that are attached to your post, which should be way more convenient than loading it up in a text editor and copying and pasting the code.[code]


Thanks a lot. As you say, long sgfs will lead to problems in the future. But one can't solve all problems at the same time :)
User avatar
Phelan
Gosei
Posts: 1449
Joined: Tue Apr 20, 2010 3:15 pm
Rank: KGS 6k
GD Posts: 892
Has thanked: 1550 times
Been thanked: 140 times

Re: Sgf downloads in eidogo broken.

Post by Phelan »

Doesn't work for me, I get "There was a problem retrieving the game data."
a1h1 [1d]: You just need to curse the gods and defend.
Good Go = Shape.
Associação Portuguesa de Go
User avatar
ChradH
Dies with sente
Posts: 106
Joined: Wed Apr 21, 2010 8:40 am
Rank: EGF 8k
GD Posts: 0
Universal go server handle: ChradH
Location: Germany
Has thanked: 64 times
Been thanked: 7 times

Re: Sgf downloads in eidogo broken.

Post by ChradH »

Attached sgf works fine here (Firefox 3.6.3).

@fwiffo: How do you create these posts? Save once with attached sgf file to know the url, then edit post to add sgf tags?
It would be super-convenient if you could post in one go by writing something like

Code: Select all

[sgf-full]ATTACHED-SGF[/sgf-full] (limited to one sgf per post)

or even more comfortable, identifying sgf by file name, thus allowing multiple sgfs:

Code: Select all

[sgf-full]attachment:filename.sgf[/sgf-full] (probably difficult to implement)

[edit]These declarations within the sgf tags should be replaced by the actual attachment url on posting
To sig or not to sig, that is the question.
User avatar
fwiffo
Gosei
Posts: 1435
Joined: Tue Apr 20, 2010 6:22 am
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
Location: California
Has thanked: 49 times
Been thanked: 168 times

Re: Sgf downloads in eidogo broken.

Post by fwiffo »

@Phelan: For the one I just posted? What browser are you using? Are you logged in to http://www.lifein19x19.com or the URL without the www.?

@ChradH: I add the file then click "preview" - the attachment will show up in the preview area. I copy the URL from there and then put it inside the SGF tags. I know that's not convenient, but the change to make that much possible was a pretty quick fix that I was able to do last night. I have exactly the sort of thing you have in mind, but it'll take more development. Actually, what I'd like to do is be able to use the "place inline" button with SGF files the way you would for images.
User avatar
Phelan
Gosei
Posts: 1449
Joined: Tue Apr 20, 2010 3:15 pm
Rank: KGS 6k
GD Posts: 892
Has thanked: 1550 times
Been thanked: 140 times

Re: Sgf downloads in eidogo broken.

Post by Phelan »

fwiffo wrote:@Phelan: For the one I just posted? What browser are you using? Are you logged in to http://www.lifein19x19.com or the URL without the www.?


Yep, for the one you just posted. Others seem to work fine. I have Firefox 3.6.3, on Windows XP, and Am logged in with the www.
a1h1 [1d]: You just need to curse the gods and defend.
Good Go = Shape.
Associação Portuguesa de Go
User avatar
ChradH
Dies with sente
Posts: 106
Joined: Wed Apr 21, 2010 8:40 am
Rank: EGF 8k
GD Posts: 0
Universal go server handle: ChradH
Location: Germany
Has thanked: 64 times
Been thanked: 7 times

Re: Sgf downloads in eidogo broken.

Post by ChradH »

fwiffo wrote:@ChradH: I add the file then click "preview" - the attachment will show up in the preview area. I copy the URL from there and then put it inside the SGF tags. I know that's not convenient, but the change to make that much possible was a pretty quick fix that I was able to do last night. I have exactly the sort of thing you have in mind, but it'll take more development. Actually, what I'd like to do is be able to use the "place inline" button with SGF files the way you would for images.

Ah, preview uploads the files already. Nice trick. That's better than having to edit the post every time.
By the way, I absolutely like the attachment idea and am amazed how quick you found this solution which works really well. Big thumbs up!
To sig or not to sig, that is the question.
dfan
Gosei
Posts: 1598
Joined: Wed Apr 21, 2010 8:49 am
Rank: AGA 2k Fox 3d
GD Posts: 61
KGS: dfan
Has thanked: 891 times
Been thanked: 534 times
Contact:

Re: Sgf downloads in eidogo broken.

Post by dfan »

Phelan wrote:
fwiffo wrote:@Phelan: For the one I just posted? What browser are you using? Are you logged in to http://www.lifein19x19.com or the URL without the www.?

Yep, for the one you just posted. Others seem to work fine. I have Firefox 3.6.3, on Windows XP, and Am logged in with the www.

The same goes for me (both the problem and the context).
Post Reply