Cannot get Fountain Support to work
Using the most up to date instructions on the Candler Blog I cannot get fountain documents to show up in the app - they always appear as blank. I then tried downloading a fountain doc from their site (thinking maybe mine was somehow wrong) and it caused Marked to crash.
I've tried SEVERAL times now. I've even uninstalled the app and reinstalled everything from scratch to try and get it working again but cannot.
Any help anyone could offer would be GREATLY appreciated! I really want to start using fountain for screenplay use (it'd actually get me writing more) but until I can get it actually working in an app I'm stalled.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 01 May, 2012 03:19 AM
Hi Adam,
Before we start debugging, can you tell me what your comfort level with the command line/Terminal is? I just need to know how much detail to include in my questions/instructions.
2 Posted by Adam Schoales on 01 May, 2012 03:33 AM
I've done a bit of tinkering here and there - certainly can copy and paste commands. But I'm no expert. I came to the mac in the OS X days so Command Line has never been a major need for me.
But I'm willing to give anything a shot ;)
Support Staff 3 Posted by Brett on 01 May, 2012 12:50 PM
Ok, so I need to know if the command you're using gives you output on the command line first. Copy the path you have in the custom processor field, then go to Terminal run:
`cat path/to/a/file.fountain | the/command/path`
Without any backticks, and where path/to/a/file.fountain is a fountain file. If it were on your desktop the path would be ~/Desktop/file.fountain, for example. Do you get HTML as a result of the command?
4 Posted by Adam Schoales on 02 May, 2012 02:28 AM
Okay so here's what I put:
> cat ~/Desktop/BigFish.fountain | /Users/adamschoales/Library/Application\ Support/Marked/screenplain-marked/screenplain_marked.sh
(got this by dragging the actual screenplain_marked.sh file into terminal) and the terminal output was
> -bash: /Users/adamschoales/Library/Application Support/Marked/screenplain-marked/screenplain_marked.sh: /bin/bash: bad interpreter: Operation not permitted
I then tried dragging typing cat and dragging both the fountain file into terminal (to get it to fill in all the info itself) added the | and then dragged the screenplain unix executable to get the proper director and got the following:
> Zaphod:~ adamschoales$ cat /Users/adamschoales/Desktop/BigFish.fountain | /Users/adamschoales/Library/Application\ Support/Marked/screenplain-marked/bin/screenplain
> -bash: /Users/adamschoales/Library/Application Support/Marked/screenplain-marked/bin/screenplain: /usr/bin/env: bad interpreter: Operation not permitted
Maybe I'm doing something wrong in terminal, I don't know... I'm so lost it's not even funny...
On 2012-05-01, at 8:50 AM, Brett wrote:
> |
Support Staff 5 Posted by Brett on 02 May, 2012 02:43 AM
2 questions, then:
What is the first line of the sh file, and have you made it executable? (chmod a+x "/Users/adamschoales/Library/Application Support/Marked/screenplain-marked/screenplain_marked.sh")
6 Posted by Adam Schoales on 02 May, 2012 03:02 AM
The script looks as follows (hasn't been changed from the original download)
> #!/bin/bash
> # This shell script points to your installation of screenplain. By default it is set to `~/Library/Application\ Support/Marked/screenplain-marked/bin/screenplain`. If you place the complete `marked-screenplain` folder into `~/Library/Application Support/Marked` then you should not need to edit this script.
> # If the script is not working, you should open Terminal (located in `Applications/Utilities`) and make the file executable by typing `chmod a+x /path/to/screenplain_marked.sh `
>
> cat | ~/Library/Application\ Support/Marked/screenplain-marked/bin/screenplain --format html --bare - -
I had tried the chmod before but DIDN'T have it in quotations (before when I tried to run it it did nothing).
Trying that I got the following results:
> Zaphod:~ adamschoales$ chmod a+x "/Users/adamschoales/Library/Application\ Support/Marked/screenplain-marked/screenplain_marked.sh"
> chmod: /Users/adamschoales/Library/Application\ Support/Marked/screenplain-marked/screenplain_marked.sh: No such file or directory
> Zaphod:~ adamschoales$
*sigh*
Support Staff 7 Posted by Brett on 02 May, 2012 02:20 PM
Yeah, the quotes and the backslash in Application Support are
redundant, you only need one or the other. To check if it's already
executable, do
ls -l ~/Library/Application\ Support/Marked/screenplain-marked/bin/screenplain
Let me know what that gets you. Also please paste the exact text you
have in the custom processor field. We'll figure this out, I promise
:).
8 Posted by Adam Schoales on 03 May, 2012 03:19 AM
Ran that command and got:
> -rwxr-xr-x@ 1 adamschoales staff 241 1 Mar 10:46 /Users/adamschoales/Library/Application Support/Marked/screenplain-marked/bin/screenplain
Also, here's what I've got in my custom processor:
> /Users/adamschoales/Library/Application Support/Marked/screenplain-marked/screenplain_marked.sh
Thanks for you help!!
Support Staff 9 Posted by Brett on 04 May, 2012 01:02 PM
Ok, run this for me in Terminal, substituting /yourfile.fountain with a fountain document you can test with. You'll need the full path to the document:
You should get HTML output in Terminal if that works. Let me know.
10 Posted by Adam Schoales on 04 May, 2012 11:51 PM
Alright here we go...
> Zaphod:~ adamschoales$ cat /Users/adamschoales/Desktop/BigFish.fountain | "/Users/adamschoales/Library/Application Support/Marked/screenplain-marked/screenplain_marked.sh"
> /Users/adamschoales/Library/Application Support/Marked/screenplain-marked/screenplain_marked.sh: /Users/adamschoales/Library/Application Support/Marked/screenplain-marked/bin/screenplain: /usr/bin/env: bad interpreter: Operation not permitted
Support Staff 11 Posted by Brett on 05 May, 2012 12:28 AM
Ok. Does the first line of your shell script start with #!/usr/bin/env? Sounds like we need to change that first. I'll take a look at the default script when I'm back to my computer and send you a revision.
-Brett (on iPhone)
12 Posted by Adam Schoales on 05 May, 2012 01:46 AM
No it seems to start with
> #!/bin/bash
the complete contents are as follows:
> #!/bin/bash
> # This shell script points to your installation of screenplain. By default it is set to `~/Library/Application\ Support/Marked/screenplain-marked/bin/screenplain`. If you place the complete `marked-screenplain` folder into `~/Library/Application Support/Marked` then you should not need to edit this script.
> # If the script is not working, you should open Terminal (located in `Applications/Utilities`) and make the file executable by typing `chmod a+x /path/to/screenplain_marked.sh `
>
> cat | ~/Library/Application\ Support/Marked/screenplain-marked/bin/screenplain --format html --bare - -
Support Staff 13 Posted by Brett on 07 May, 2012 08:05 PM
Sorry for the delayed response.
That's exactly how it should start, turns out it's the screenplain executable that calls env. So, rather than hack apart the Python application, we'll need to figure out why env isn't working for you.
It's either env, or a bad python installation. On your command line, type:
Let me know what you see. It should open the Python command line interpreter, but I have a feeling you're going to get an error. If you do, type:
If that works, it's probably an issue with paths that we can solve with one line in the shell script.
Let me know if that gets you anywhere.
14 Posted by Adam Schoales on 07 May, 2012 08:20 PM
Adding to the mystery...
> Zaphod:~ adamschoales$ /usr/bin/env python
> Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05)
> [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>>
Support Staff 15 Posted by Brett on 07 May, 2012 08:50 PM
So it's likely a problem with your path disappearing when Marked runs the script. Try adding the `export` command before the call to screenplain in your script.
16 Posted by Adam Schoales on 08 May, 2012 01:27 AM
So it should look like this?
> #!/bin/bash
> # This shell script points to your installation of screenplain. By default it is set to `~/Library/Application\ Support/Marked/screenplain-marked/bin/screenplain`. If you place the complete `marked-screenplain` folder into `~/Library/Application Support/Marked` then you should not need to edit this script.
> # If the script is not working, you should open Terminal (located in `Applications/Utilities`) and make the file executable by typing `chmod a+x /path/to/screenplain_marked.sh `
>
> export cat | ~/Library/Application\ Support/Marked/screenplain-marked/bin/screenplain --format html --bare - -
I tried that and doesn't seem to be doing anything... I cannot fathom what I'm doing wrong here... haha
Support Staff 17 Posted by Brett on 08 May, 2012 02:02 AM
Oops, no, I meant the full export command I posted above
on its own line before
cat |...
18 Posted by Adam Schoales on 08 May, 2012 02:57 AM
Crud, still nothing.
This is what it looks like currently.
> #!/bin/bash
> # This shell script points to your installation of screenplain. By default it is set to `~/Library/Application\ Support/Marked/screenplain-marked/bin/screenplain`. If you place the complete `marked-screenplain` folder into `~/Library/Application Support/Marked` then you should not need to edit this script.
> # If the script is not working, you should open Terminal (located in `Applications/Utilities`) and make the file executable by typing `chmod a+x /path/to/screenplain_marked.sh `
>
> export PATH=/usr/bin:$PATH
>
> cat | ~/Library/Application\ Support/Marked/screenplain-marked/bin/screenplain --format html --bare - -
Support Staff 19 Posted by Brett on 08 May, 2012 10:35 AM
Try this, just to be sure all of this is necessary:
Go into Preferences->Behavior and change the Custom Processor line to:
(no slashes or quotes). Leave the arguments field blank and save. If that doesn't work, add
--format html --bare - -
to the arguments. If still no go, check Console.app and see if you're still getting theenv
error message.Sorry this is taking so much work to figure out, I haven't seen this error crop up on anyone else's system before...
20 Posted by Adam Schoales on 08 May, 2012 12:42 PM
Doesn't seem to have done it...
With no arguments:
> 12-05-08 8:36:53.300 AM Marked: *** NSTask: Task create for path '/Users/adamschoales/Library/Application Support/Marked/screenplain-marked/bin/screenplain' failed: 22, "Invalid argument". Terminating temporary process.
with arguments:
> 12-05-08 8:37:41.073 AM Marked: *** NSTask: Task create for path '/Users/adamschoales/Library/Application Support/Marked/screenplain-marked/bin/screenplain' failed: 22, "Invalid argument". Terminating temporary process.
And here's the MOST interesting part - there are a few of these in the console...
> 12-05-08 8:37:07.224 AM ReportCrash: Saved crash report for Marked[24296] version ??? (???) to /Users/adamschoales/Library/Logs/DiagnosticReports/Marked_2012-05-08-083707_Zaphod.crash
here it is again after changing arguments:
> 12-05-08 8:38:43.032 AM ReportCrash: Saved crash report for Marked[24325] version ??? (???) to /Users/adamschoales/Library/Logs/DiagnosticReports/Marked_2012-05-08-083843_Zaphod.crash
So it looks like something IS going on... it's just WHAT I have no idea...
Maybe we need to do a remote desktop session or something so you can attempt to check everything you need to check and make sure I'm not missing something. It's really strange, but I think those have something to do with it...
Support Staff 21 Posted by Brett on 08 May, 2012 01:05 PM
Can you send me the last crash report? (
/Users/adamschoales/Library/Logs/DiagnosticReports/Marked_2012-05-08-083843_Zaphod.crash
). It's probably crashing because of the NSTask error, but does Marked actually quit or freeze when you see that message?If you're willing, we can set up an SSH session and I can just work in Terminal to see where things are at. A screenshare may be needed after that to check Marked settings, but an SSH terminal session would be the easiest way for me to see what errors are happening. Let me know what you think. I can contact you off-board with AIM and email info for sharing details.
22 Posted by Adam Schoales on 09 May, 2012 11:36 AM
Here's the crash report:
[[Edited...]]]
I'm cool with doing an SSH session. Just let me know the details.
Support Staff 23 Posted by Brett on 09 May, 2012 12:03 PM
So does Marked spin or crash when you get that message, or does it just happen in the background?
I'll contact you by email today to set up the credentials to get me over SSH in so I can see that everything's working on the backend. We'll go from there.
24 Posted by Adam Schoales on 09 May, 2012 01:58 PM
That's the weird part... it doesn't crash or anything. It's very bizarre.
Support Staff 25 Posted by Brett on 09 May, 2012 02:08 PM
It's because it's the background render task that's crashing, not Marked itself. The script is returning an error that NSTask can't handle. It's handy to know, I can probably put in a failsafe and visible error message for that, but it doesn't really solve anything for us. We'll get there, thanks for your amazing patience :).
Support Staff 26 Posted by Brett on 17 May, 2012 12:18 PM
Posting for posterity:
The issue turned out to be that the screenplain install had converted to DOS newlines and couldn't be read by Python. I'll make sure that the download isn't causing this from the start, but if you run into it... Change to the directory where the screenplain folder is located, and from one level below the screenplain folder, run:
Should do the trick.
Brett closed this discussion on 17 May, 2012 12:18 PM.