Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.12 compatibility issue: TypeError: Meta.__new__() got an unexpected keyword argument 'engine' #69

Open
laramirez opened this issue Jan 24, 2025 · 2 comments

Comments

@laramirez
Copy link

laramirez commented Jan 24, 2025

Hello,

Following my previous issue, I can confirm that I get the TypeError only when using Python 3.12 and not Python 3.11.

for firewall_cluster in FirewallCluster.objects.all():
     for physical_interface in cluster_firewall.physical_interface.all():
         if physical_interface.is_primary_mgt:  # this triggers the error (in 3.12 only, otherwise works fine)
TypeError: Meta.__new__() got an unexpected keyword argument 'engine'

Could it be a serialization issue?

@lilianValeroFp
Copy link
Contributor

Hi, we will take a look and we keep you posted. BR

@thomasdevulder
Copy link
Contributor

Could not reproduce using python version:

agrant@dev-vm:~/PycharmProjects/smc-python/.venv1/bin$ ./python --version
Python 3.12.8

code:

for firewall_cluster in FirewallCluster.objects.all():
    for physical_interface in firewall_cluster.physical_interface.all():
        if physical_interface.is_primary_mgt:  # this triggers the error (in 3.12 only, otherwise works fine)
            logging.info(f"{firewall_cluster} - {physical_interface} is primary address")

got:

...
2025-01-27 10:19:48,904 - root - [INFO] : FirewallCluster(name=Algiers) - ClusterPhysicalInterface(name=Interface 1) is primary address
2025-01-27 10:19:49,016 - root - [INFO] : FirewallCluster(name=Tunis) - ClusterPhysicalInterface(name=Interface 1) is primary address
2025-01-27 10:19:49,091 - root - [INFO] : FirewallCluster(name=Madrid) - ClusterPhysicalInterface(name=Interface 1) is primary address 

Can you send the full Traceback ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants