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.


    trouble with first program

    Pythonista
    2
    3
    1506
    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.
    • cb
      cb last edited by ccc

      hi folks,
      i have some trouble with pythonista on ipad... (i am complete new here and also new to python) under Mac OS this code runs without error in PyCharm with 3.6.

      def extract_redirect_url(r):
          return redurl_re.search(r.text).group(1)
      

      but with pythonista the following error occurs "NoneType object has not attribute "group".

      I think the problem is in re.py

      please help

      cb

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

        Your search returned None, so group1 does not exist. You should break up the statement and check for a valid result before trying to use it.

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

          @JonB thanks a lot for your tip. i had searched a wrong phrase... sorry and thanks
          cb

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