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.


    Method takes exactly 2 arguments...but it doesn't...

    Pythonista
    3
    3
    2270
    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.
    • jrh147
      jrh147 last edited by

      I have a script that works great when run from within Pythonista. It calls another script by passing three arguments to it:

      final = kraken(response['kraked_url'], path, name)
      

      And this is what kraken() looks like:

      def kraken(image_link,path,name):
      

      However, when I run it as an iOS extension (which is what I really want to do), it ends up giving me this error:

      TypeError: kraken() takes exactly 2 arguments (3 given)
      

      What can I do to fix this?

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

        What you have here looks like it should work. Could you please provide a minimal example that we can run that will throw this error?

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

          It should work...

          When I try this:

          def kraken(a,b,c):
          	var1 = a+10
          	var2 = b+10
          	var3 = c+10
          	return(var1,var2,var3)
          
          final = kraken(1,2,3)
          print(final)
          
          

          it prints:

          (11,12,13)
          

          without an Error

          Can u post a bigger example?

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