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

Print-Job Timeout #596

Open
wkuss opened this issue Aug 19, 2024 · 3 comments
Open

Print-Job Timeout #596

wkuss opened this issue Aug 19, 2024 · 3 comments

Comments

@wkuss
Copy link

wkuss commented Aug 19, 2024

In pyipp's serializer.py, the encode_dict function does not handle the data attribute in data, resulting in file data not being sent to the Print device at print-job.

pyipp version: 0.16.0

@so-saf
Copy link
Contributor

so-saf commented Aug 19, 2024

@wkuss hi, I ran into a similar problem, my solution was to add the following three lines right to the end of the encode_dict function:

if isinstance(data.get("data"), bytes):
    encoded += data['data']
    encoded += struct.pack(">b", IppTag.END.value)

ipptool generates the contents of http packets similarly.
This is probably not the best solution, so I would wait for the author's comments.

@so-saf
Copy link
Contributor

so-saf commented Aug 19, 2024

In general, as it turned out, there are lines of code necessary for printing in the source files, the functionality was added as part of PR #510, which was adopted after the last release.

@ctalkington Is there an opportunity to make a new release? This functionality would be useful :)

@wkuss
Copy link
Author

wkuss commented Sep 25, 2024

Yeah, that's how I worked it out.

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

2 participants