omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Problem with python script

    Pythonista
    2
    3
    2136
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • filippocld223
      filippocld223 last edited by

      trying this code :

      #coding: utf-8
      import workflow
      action_in = workflow.get_input()
      
      if action_in.endswith('     ')==True :
      	action_out='True'
      else:
      	pass 
      
      workflow.set_output(action_out)
      
      

      Editorial gives this error: NameError:line 10 name "action_out" is not defined

      1 Reply Last reply Reply Quote 0
      • omz
        omz last edited by

        You should set action_out to some default value before the if statement. If the condition isn't true, you never set action_out to any value, so it isn't defined. Alternatively, you could set it to a different value in the else part.

        1 Reply Last reply Reply Quote 0
        • filippocld223
          filippocld223 last edited by

          oh scuse me xD

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors