Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Python - production error

Hamder83
11 - Bolide

Hi 

I have a small piece of python code that works flawlessly when using the interactive mode.:


When I change it to production code I get an error.

#################################
# List all non-standard packages to be imported by your 
# script here (only missing packages will be installed)
from ayx import Package
#Package.installPackages(['pandas','numpy'])


#################################
from ayx import Alteryx
from ayx import Package
import pandas as pd
from azure.servicebus import ServiceBusClient, ServiceBusMessage
import os


#connstr = "XXXX"

queue_name = "invoicedk"
df = Alteryx.read("#1")

series = pd.Series(df['JSON'], index=df.index)

for specificationRows in series:
    with ServiceBusClient.from_connection_string(connstr) as client:
        with client.get_queue_sender(queue_name) as sender:
          
            
            single_message = ServiceBusMessage(specificationRows)
            sender.send_messages(single_message)


Is it me misunderstanding something?

Python (29) AttributeError: 'NoneType' object has no attribute 'debug' ¶Exception ignored in: 'uamqp.c_uamqp.cMessage.__dealloc__' ¶AttributeError: 'NoneType' object has no attribute 'debug' ¶AttributeError: 'NoneType' object has no attribute 'debug' ¶Exception ignored in: 'uamqp.c_uamqp.cMessage.__dealloc__' ¶AttributeError: 'NoneType' object has no attribute 'debug' ¶AttributeError: 'NoneType' object has no attribute 'debug' ¶Exception ignored in: 'uamqp.c_uamqp.cTarget.__dealloc__' ¶AttributeError: 'NoneType' object has no attribute 'debug' ¶
Python (29) Error in sys.excepthook:¶¶Original exception was:¶Error in sys.excepthook:¶¶Original exception was:¶Error in sys.excepthook:¶¶Original exception was:¶Error in sys.excepthook:¶¶Original exception was:¶Error in sys.excepthook:¶¶Original exception was:¶Error in sys.excepthook:¶¶Original exception was:¶

1 REPLY 1
PanPP
Alteryx Alumni (Retired)

Hi @Hamder83,

 

The recommendation is to utilize the interactive mode as explained in the following KB Article.

 

You can also reach out to support@alteryx.com if you would like to gather more information as to why production mode doesn't work.

 

Please let us know if you have any questions. Please like this post / mark it as a solution if it helps resolve your issue. 

 

 

 

 

 

Labels
Top Solution Authors