Skip to content

Permission Error with filepath= #103

@carlosace3

Description

@carlosace3

Great stuff! works great but I have a problem:

Trying to save att to an specific filepath but it appear to not have the correct permission, opened my script as admin but it does not work:

`messages = gmail.get_messages(query=construct_query(query_params))

for message in messages:
if message.attachments:
for attm in message.attachments:
print("File: " + attm.filename)
attm.save(filepath="files", overwrite=True)
`
Traceback (most recent call last):
attm.save(filepath="files", overwrite=True)
with open(filepath, 'wb') as f:
^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'files'

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