Hello,
I just installed Twine 1.4.1, and the editor seems to work fine but I can't test or build a story.
I get an ascii codec error, even though I don't have any special characters in my story. In fact, I get this error even with the basic starting story that appears when opening Twine too. So, to reproduce the error, I just need to launch Twine and press ctrl+t.
Any idea what's going on?
Comments
Are you using Python that came with Twine or that was already installed on your computer?
Can you post the full error message? I don't know if Twine includes the backtrace (list of file names, line number and fragments of source code), but if it does, that is very useful for programmers to track down a problem.
The error message is:
"An error occured while building your story ('ascii' codec can't decode byte 0xe4 in position 35: ordinal not in range(128))."
Unfortunately I don't get a traceback. Is there some kind of debug mode? I tried to run Twine from the command line but I didn't get any output there either.
In Linux, running the starting story skeleton works fine, so there must be some particular circumstance that triggers the problem.
What language is your Windows set to? Byte 0xe4 is a-umlaut in ISO Latin 1; this character doesn't occur in the start story, but maybe it exists in a string that comes from the OS? Or maybe in the path that you installed Twine in?
Maybe I could figure something out by downloading the source and going from there.
It's a weird API choice though; returning Unicode strings would have been safer in my opinion. I guess this is a good example of why Python 3 switched to "all actual strings are Unicode and encoded strings are byte arrays".
Anyway, it should be simple to fix; I'll make a patch.
Edit: Patch is in this pull request.
Getting there. January specifically wasn't the issue in my case. It's the last token, the %Z; I ran the strftime function in the console and I'm getting "Vsteuropeisk tid". %Z prints the name of the time zone, in the current locale it seems.
Could you patch this in as well?
Can you try this in the console?
This is a known bug with what seems to be my Windows copy of Python:
This works correctly in the OS X version, however.
I guess I'll accept the pullreq, but ideally I'd like a solution where it was guaranteed to produce the +nnnn offset instead of the timezone name.
How strange that you can get the timezone name but not the UTC offset. http://pytz.sourceforge.net/ seems to handle this.
An alternative would be to avoid using the "%z" option and instead format the offset ourselves: Note that + and - are swapped from what you might expect, this is to match the time.timezone output.
What would be the problem of changing the timestamp format? The only place it's used is to insert a comment into the HTML, from what I can see. I'm not aware of anyone extracting the build date from games, but if there is, they would probably benefit from having a locale-independent date representation.
Event the help forum didn't want to upload my post, so I write it again.
I installed Twine two days ago.
I started writing an interactive fiction.
No special character, no fancy CSS.
I tested it and it worked well.
Yesterday, I improved the story (giving it some more lenght), then tested it... it worked well.
Today, I just can't test anything.
I imporved again, deleted all my improvements, de-installed and re-installed Twine twice.
I made another story with only 3 passages and 2 links.
Still no special character and no fancy CSS.
It still won't work.
The error message says : "An error occured when building your story ('ascii' codec can't decode byte 0xe9 in position 13: ordinal not in range(128))."
I read this full thread and didn't understand much things (Sorry, I've got no degree in informatics).
So if I'm not given an easy solution or a clear and detailed explanation of what is discussed in this thread, I'll just uninstall Twine again... and permanently : I don't want to waste time with a program that randomly decides if it works or not.
If that is the case, here are some options:
- configure Windows to show the date in English
- set back the date of the computer a few days (I don't know if this could cause problems with other applications)
- wait for Twine 1.4.2 to be released
None of them are particularly great options, but it is all I can offer you since I don't run Windows myself.I tried to write something with Twine in German and I get the same error message. I use Windos 7/64. So it isn't ossble to use Twine in a German environment? I think I cold have much fun wit this software and I hope this Ascii Codec problem really can be solved in the next release.I certaily don't want to change my Windows date format or use a virtual ystem. In German i also hae to write Umlauts , , . I hope this isn't a problem.
Grets
Thorsten1111
P.S.: I used Twine now in January (Januar) and February (Februar). There are no accents, umlauts or other special characters in these German month names I think.
Sorry for not doing this earlier.