Mac user getting an error on the tutorial

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Free Time Machine
Regular
Posts: 42
Joined: Fri Jun 15, 2007 9:45 am
Location: Philly, USA
Contact:

Mac user getting an error on the tutorial

#1 Post by Free Time Machine »

If this has been asked before, sorry!

Hi all! I just recently discovered RP and I'm trying it out now. I'm trying to learn by following along with the tutorial. But, no matter what, I seem to be getting the same error message. Could this be a Mac thing? The text editor I am using is TextEdit. By the way, TextEdit doesn't launch when I choose "Edit Script" from the Launcher. It will launch, however, to tell me what errors I've been having.

I attached the errors.txt file. I tried going with a different tutorial... but it's the same message.

Thanks!
FTMachine
Attachments
errors.txt
(314 Bytes) Downloaded 144 times

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#2 Post by PyTom »

Hm... for some reason, your text editor is not emitting the correct line ending character. It's using carriage-return instead of linefeed, so everything is showing up on one line.

Could one of our mac users suggest how to change that?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Wintermoon
Miko-Class Veteran
Posts: 701
Joined: Sat May 26, 2007 3:41 pm
Contact:

#3 Post by Wintermoon »

Isn't it the parsers responsibility to recognize all valid unicode line endings? (See http://en.wikipedia.org/wiki/Newline#Unicode.)

Free Time Machine
Regular
Posts: 42
Joined: Fri Jun 15, 2007 9:45 am
Location: Philly, USA
Contact:

#4 Post by Free Time Machine »

Thanks PyTom. :D I had the feeling the problem had something to do with the way the text was encoded and not with how I was inputting it, but I wouldn't have been able to pinpoint it myself.

I was able to use that insight to look into the problem on my own a little bit further. It appears that Ren'Py recognizes customary Windows line breaking, but not what's standard for the Mac. The best way for a user to get around this at the moment is probably to change the line break method of the .rpy file using the text editor itself.

TextEdit, the built in text editor for the Mac, doesn't appear to have this feature. So today I went hunting and found a good freeware text editor for the Mac with a lot of features specifically geared towards coding. Using the editor I was able to change the break character from CR to CRLF. (I also turned on automatically adding LF to the end of a document if there is none; I don't know whether or not this was necessary to solve the problem.) Now it works!

I'd just like to say that I'm very grateful this program has Mac support at all. :D A lot of people feel that the returns on Mac compatibility aren't high enough to warrant the effort, so I appreciate this. Until the problem can be resolved within Ren'Py, it would probably be best to mention this workaround somewhere within the documentation Wiki.

One more thing: an ability to specify which text editor opens from the Ren'Py launcher would make for very cool feature in a future release! :wink:

Thanks again! -FTMachine

PS: I found the good editor here: http://smultron.sourceforge.net/
(It's Mac-only, though :wink: )

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#5 Post by PyTom »

The thing is, on my machine, TextEdit sticks in newlines. IIRC, Apple switched to the unix-style line endings when OS X came out.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Free Time Machine
Regular
Posts: 42
Joined: Fri Jun 15, 2007 9:45 am
Location: Philly, USA
Contact:

#6 Post by Free Time Machine »

Wait, I'm running OS X. What's that mean? *is now more confused than ever*
Last edited by Free Time Machine on Fri Jun 15, 2007 11:19 pm, edited 2 times in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#7 Post by PyTom »

Yeah, that's what I'm finding weird. Which version of OS X are you using?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Free Time Machine
Regular
Posts: 42
Joined: Fri Jun 15, 2007 9:45 am
Location: Philly, USA
Contact:

#8 Post by Free Time Machine »

10.4.6. But it's the Power PC variety, not the new Intel kind.

Free Time Machine
Regular
Posts: 42
Joined: Fri Jun 15, 2007 9:45 am
Location: Philly, USA
Contact:

#9 Post by Free Time Machine »

What's more, converting to Mac/Unix-style endings did not fix the problem for me. Converting to Windows-style endings fixed it. I don't know if that helps at all...

rocket
Veteran
Posts: 373
Joined: Tue Jul 10, 2007 2:54 am
Projects: Starlight Ep0, Ep1
Location: San Fransisco
Contact:

Re: Mac user getting an error on the tutorial

#10 Post by rocket »

I just had the same problem last night....

It's *not* Text Edit's fault.

It's copy and paste from the web sample (in my case from Firefox) to any text editor (I had the same problem using BBEdit which shows EOL chars and really had me pulling my hair out).

Type away in Text Edit and you'll be fine. But really, there are better editors.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Mac user getting an error on the tutorial

#11 Post by PyTom »

Also, 6.3.1 should be a bit more resistant to this sort of thing.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], DewyNebula, Sugar_and_rice