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

Trying to add an attachments returns response 201 #534

Open
Th0ught09 opened this issue Jan 31, 2023 · 0 comments
Open

Trying to add an attachments returns response 201 #534

Th0ught09 opened this issue Jan 31, 2023 · 0 comments

Comments

@Th0ught09
Copy link

Trying to add an image to a ticket using the instructions listed here but I error out with "Could not handle response". After some digging I see that my response generated was 201 and this means it does not pass any of the checks but I'm not sure how to about fixing it. Code until line where it errors out:

from zenpy import Zenpy
from zenpy.lib.api_objects import Ticket, User, Comment


def main():
    zenpy_client = Zenpy(email='[email]', password='[password]', subdomain="[Domain]")
    ticket_payload = Ticket(description='Test', type='task', assignee_id=8881140002961)
    ticket_payload.ticket_form_id = 360003997937
    # zenpy_client.tickets.create(ticket_payload)
    u = zenpy_client.attachments.upload('/home/[ad_creds]/Pictures/Ohio.jpeg', target_name='Ohio.jpeg')

I have triple chacked the file path using xdg-open.
Any would would be much appreciated!

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

1 participant