Skip to content

It throws an exception when running on windows 10 cmd.exe after packed into an .exe script by pyinstaller command #270

Description

@xiawenniu

OS: windows 10
python version: 3.12.0
package version: 0.15.293
pyinstaller version: 6.1.0

Description: I use pyinstaller to translate this python script to executable script on windows 10 and run it, but an exception is avoided below:

Exception ignored in: <function SMTP.del at 0x00000262924C8900>
Traceback (most recent call last):
File "yagmail\sender.py", line 261, in del
File "yagmail\sender.py", line 203, in close
TypeError: catching classes that do not inherit from BaseException is not allowed

Code like this :

yag = yagmail.SMTP(user=sender_account, password=sender_password, host=smtp_server)
try:
yag.send(to=row[EMAIL_INDEX_NAME], subject=subject, contents=content, attachments=
attachment_path)
time.sleep(30)
except BaseException as e:
print(e)

yagmail.SMTP.close

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions