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

Minor issue with documentation #252

Open
JWindy opened this issue Mar 15, 2023 · 3 comments
Open

Minor issue with documentation #252

JWindy opened this issue Mar 15, 2023 · 3 comments

Comments

@JWindy
Copy link

JWindy commented Mar 15, 2023

Hey,

on your documentation under the headline "Printer instance" it says to create the printer-object by: printer = Printer(const.PrinterType.I3MK3, SN, SERVER, TOKEN)

This throws the following error:
init
if max_retries > 1:
TypeError: '>' not supported between instances of 'str' and 'int'

It seems the constructor doesn't require the server address at all. With the code in your documentation, the SERVER address is written to the token variable and the TOKEN is written to max_retries, which is a string but should be an integer for the if statement.

Besides, I don't see, what the FINGERPRINT is used for. I assume, only the TOKEN is required.

.from_config() doesn't seem to work for me and I couldn't find it in the source.

Johannes

@TojikCZ
Copy link
Contributor

TojikCZ commented Mar 15, 2023

Hi, thanks for the report. I think it's likely you'll find more discrepencies.

What are you trying to make with it?

@JWindy
Copy link
Author

JWindy commented Mar 15, 2023

I installed a Pi Zero in my printer and I tested Octoprint and PrusaLink. PrusaLink is not supporting the pi camera and Octoprint is aparrently to demanding on the limited resources. So I wrote a python script, which takes a picture every minute and saves it to my NAS, but only, while the printer is actually printing. So I get the printer state by using the API you provide here. Thank's alot for the code!

@ondratu
Copy link
Collaborator

ondratu commented Mar 15, 2023

Actually, from version 0.7.0rc3, PrusaLink supports pi cameras, and we'll be glad, if you test it.

Thanks for report!

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

3 participants