Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary last pass move is added to saved sgf #32

Open
lp200 opened this issue Jan 31, 2018 · 6 comments
Open

Unnecessary last pass move is added to saved sgf #32

lp200 opened this issue Jan 31, 2018 · 6 comments
Labels
Milestone

Comments

@lp200
Copy link

lp200 commented Jan 31, 2018

also result is missing.

@fsparv
Copy link
Owner

fsparv commented Feb 1, 2018

Thanks for your input, can you please separate these two issues and provide specific examples in the description for each one. It's particularly problematic to have feature requests (adding the result, which I don't believe has ever been present) and possible bugs (incorrect SGF, maybe a regression?) in the same ticket.

@lp200
Copy link
Author

lp200 commented Feb 1, 2018

Sorry
An example of pass move.

304 (W G9) Move:G9
305 (B G8) Move:G8
306 (W D9) Move:D9
307 (B E9) Move:E9
308 (W resign) Move:resign

Uploaded SGF
W[gk];B[gl];W[dk];B[ek])

Saved SGF
W[gk];B[gl];W[dk];B[ek];W[ ])

@miguno
Copy link

miguno commented May 11, 2018

I think I ran into the same issue, which I originally reported at pnprog/goreviewpartner#56.

I had a quick check, and apparently, the issue lies at the end of the SGF file:

;W[fb];B[cc];W[dd];B[eb];W[cb];B[ ])

The last B ("black plays") property is empty B[ ] (two empty space). Apparently, this is a violation of SGF format, and makes Gomill (the sgf parsing library used by GRP) fails to parse this SGF file (I checked using the sgf checker).

As a temporary workaround, simply replace the B[ ] by B[]

@miguno
Copy link

miguno commented May 11, 2018

Also, this problem described here could also be the root cause of #34.

@fsparv
Copy link
Owner

fsparv commented May 15, 2018

Ah sorry folks I had forgotten about this. Thx for the additional comments. I'll see if I can address it soon. Spaces are indeed illegal as per https://www.red-bean.com/sgf/go.html#types, and the final resign move should probably not be recorded as a pass (which is the meaning of B[] or w[])

pnprog added a commit to pnprog/goreviewpartner that referenced this issue May 31, 2018
@ivysrono
Copy link

Update 1.2.1 to release?@fsparv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants