Skip to content

Issue running runmailer_pg #172

@citizenfish

Description

@citizenfish

With psycopg2 Version 2.9.5 installed and running under python 3.11

python manage.py runmailer_pg

Gives error:-

  File "/opt/homebrew/lib/python3.11/site-packages/mailer/management/commands/runmailer_pg.py", line 31, in handle
    postgres_send_loop()
  File "/opt/homebrew/lib/python3.11/site-packages/mailer/postgres.py", line 38, in postgres_send_loop
    conn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT)

However,

python manage.py runmailer

Runs as expected

Desktop

  • OS: Mac OSX Sonara
  • Django Version 5.0

Additional context
Reading the psycopg2 documents, it appears this may be a legacy method

Note This is a legacy method mixing isolation_level and autocommit. Using the respective properties is a better option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions