-
Notifications
You must be signed in to change notification settings - Fork 32
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
Creating brand new .puz files #12
Comments
Hi Rick thanks for this report! This should be a supported case for this lib but you're right that it wasn't well tested. We'd welcome a pull request to address any or all of the issues you found. |
I'm having new problems as well. Using Python 2.7, trying to save the new puzzle, I get
File "/Users/kberg/git/puzpy/puz.py", line 226, in save This is most likely the second entry in the PuzzleBuffer list, generated by this line:
Looking, looking. |
Yeah, apparently b''.join(self.data), and more specifically, this value of 0xd6 comes from the global checksum (which is 59094, and 59094 % 256 is 214, which is 0xd6.) |
Oh my goodness, it's because I had a preamble. PLS IGNORE. |
I was just trying to get a NYT puzzle and I had a similar error. I think the Times was using 'en-dashes' instead of regular dashes and I got : UnicodeEncodeError: 'latin-1' codec can't encode character '\u2013' from 'text_cksum' Don't know if it's related, it was the NYT puzzle 9/22/2021. Maybe I should start a new issue, but maybe it's in the code I'm using not in puz? |
@mixographer could you post a snippet of code where you see the issue? |
This might be fixed. I just downloaded the nytimes 9/22/21 puzzle and had no trouble loading it and saving it. |
Thanks! I'll try to think what I was trying to do at the time and check it out. |
Alternate title of this issue: calling Puzzle.save without having called Puzzle.load
I may be the first consumer of puzpy to try to create a .puz file from scratch using the provided API. The idea is to create a "blank" new Puzzle object and fill in the puzzle metatadata (title, rows, cols, etc.) the puzzle solution and the puzzle clues. My specific use case is converting another puzzle format to .puz format.
In attempting this, I ran into a few problems:
These are relatively easy issues to fix and I would be willing to try submit a pull request to address these issues, assuming you agree in spirit with the issues I described.
The text was updated successfully, but these errors were encountered: