Skip to main content
Best answer

PYTHON | runtime parameter python3.7 is no longer supported

  • February 13, 2024
  • 3 replies
  • 296 views

Mr Anomalous

Getting error “The runtime parameter of python3.7 is no longer supported use the new runtime (python3.12)”

Code follows;
 

import re

def extract_info(text):
    info_dict = {
        'Realtor Full Name': 'UNKNOWN',
        'Realtor First Name': 'UNKNOWN',
        'Realtor Last Name': 'UNKNOWN',
        'Realtor Phone': None,
        'Realtor Email': None,
        'Client Full Name': 'UNKNOWN',
        'Client First Name': 'UNKNOWN',
        'Client Last Name': 'UNKNOWN',
        'Client Phone': None,
        'Client Email': None,
    }

    client_pattern = re.compile(r"Client Name: (\w+)(?: (\w+))?\nClient Phone: (.*?)\nClient Email: (\S+)?")
    realtor_pattern = re.compile(r"Realtor Name: (\w+)(?: (\w+))?\nRealtor Phone: (.*?)\nRealtor Email: (\S+)?")

    client_match = client_pattern.search(text)
    if client_match:
        first_name, last_name, phone, email = client_match.groups()
        info_dict['Client First Name'] = first_name
        info_dict['Client Last Name'] = last_name if last_name else 'UNKNOWN'
        info_dict['Client Full Name'] = f"{first_name} {last_name if last_name else 'UNKNOWN'}"
        info_dict['Client Phone'] = phone.strip() if phone else None
        info_dict['Client Email'] = email if email else None

    realtor_match = realtor_pattern.search(text)
    if realtor_match:
        first_name, last_name, phone, email = realtor_match.groups()
        info_dict['Realtor First Name'] = first_name
        info_dict['Realtor Last Name'] = last_name if last_name else 'UNKNOWN'
        info_dict['Realtor Full Name'] = f"{first_name} {last_name if last_name else 'UNKNOWN'}"
        info_dict['Realtor Phone'] = phone.strip() if phone else None
        info_dict['Realtor Email'] = email if email else None

    return info_dict

email_content = inputData['body_plain']
info = extract_info(email_content)

output = {'output': info}

 

Best answer by Mr AnomalousBest answer by Mr Anomalous

Hi there, 
 
Cat here from Zapier - thanks for reaching out about the error message in Python Code by Zapier steps about the Python version being deprecated. This error appeared when creating and testing steps using the Python Code by Zapier action and in Zap runs for Zaps using Python code steps. 
 
Our team identified the issue, updated the Python version in use, and was able to replay any Zap runs that experienced an error. You do not need to make any further updates to your Zaps. 
 
Thanks for your patience and understanding. Please don't hesitate to contact us if any further issues remain.
 
Best,

--
Cat M. - Zapier Support

 

All set!

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Troy Tessalone
Forum|alt.badge.img+14

Hi @Mr Anomalous 

You may want to try opening a ticket with Zapier Support about this: https://zapier.com/app/get-help


Mr Anomalous
  • Author
  • Beginner
  • 2 replies
  • February 13, 2024
Troy Tessalone wrote:

Hi @Mr Anomalous 

You may want to try opening a ticket with Zapier Support about this: https://zapier.com/app/get-help

Great idea, thank you! Just submitted a ticket. 🙂


Mr Anomalous
  • Author
  • Beginner
  • 2 replies
  • Answer
  • February 13, 2024

Hi there, 
 
Cat here from Zapier - thanks for reaching out about the error message in Python Code by Zapier steps about the Python version being deprecated. This error appeared when creating and testing steps using the Python Code by Zapier action and in Zap runs for Zaps using Python code steps. 
 
Our team identified the issue, updated the Python version in use, and was able to replay any Zap runs that experienced an error. You do not need to make any further updates to your Zaps. 
 
Thanks for your patience and understanding. Please don't hesitate to contact us if any further issues remain.
 
Best,

--
Cat M. - Zapier Support

 

All set!