PyBytes API Documentation
Is it just me or is the documentation for the PyBytes API HORRIBLY inadequate? We are trying to build a commercial product with GPy and I am almost regretting my decision.
Sometimes in your program, when the Pybytes connection is disconnected and you apply a pyBytes method to attempt to reconnect, you get NameErrror: name 'pybytes' isn't defined. WTF does this even mean? Pybytes was there just a second ago!
this method is pulled DIRECTLY from the documentation:
When run it gives us : "TypeError: unexppected keyword argument 'reconnect'
That leads me to the documentation of course....
Send information message Send information message. Method pybytes.send_info_message() Example pybytes.send_info_message()
Send ping message Send ping message. Method pybytes.send_ping_message() Example pybytes.send_ping_message()
again, REALLY? Would it hurt you to tell us how to program the function and supply an example or two? I had FAR BETTER documentation with my TRS-80 Model 1 computer in 1977!
I am trying to count on this device for a commercial project that could easily be 1,000 units, but its getting harder to justify every day.
I would like to add a constructive criticism. I really like the Pycom's products, but several times I have also felt like something is missing in the documentation. Sometimes it is the way it's organized, not so easy to browse it, other times some details are missing to quickly understand how things are working/designed or how should be configured, and sometimes it's not updated. In some way, I agree with this comment: "It sounds like you should do an audit of all your documentation". I know that I'm not the only one, I have read other people saying this kind of things.
Pycom products are great, but you have to make your documentation easier to read, add all necessary details, do not assume that your users know all the internal details that you know. You have to create documentation as great as your products.
We really haven't figured out how or why yet. Its seems that if the initial connection fails from the pybytes_config.json file then any subsequent pybytes methonds in the program or after you break and try commands from the REPL results in the above "NameErrror: name 'pybytes' isn't defined" message.
Generally, if you reboot and are lucky to get a connection then the pybytes methods work as expected.
Fortunately, since publishing this, we have stumbled into a pybytes_config.json file that does seem to connect up within 16 seconds every time, so its not a critical issue for us, but for a week or so it was quite frustrating.
Ive been working on that for the past ~2 months next to all other support, and haven't even gotten to the Pybytes section yet.. I know there are things missing and out of date and I understand your frustration.
Now if you could let me know how to reproduce the issue of the pybytes library disappearing, I'm very much interested in solving that issue for you
@Gijs It sounds like you should do an audit of all your documentation. This stuff is hard enough even in the best of circumstances but when bad documentation leads you in to blind alleys for hours, it is mind-numbingly frustrating.
Im sorry you feel this way.
Is there any way I can reproduce the issue you are describing? Perhaps can you give me an (actual) example I can try?
The Pybytes library is positioned in the frozen-code section and is loaded at boot. The only reason I can think of, is that it would disappear is if the boot process was interrupted, or if all loaded items are cleared.
As for the mistake in the documentation, it seems someone copied the
connect_wifi(...)over to lte, without changing the parameters. I have the correct one for you here:
Please let me know of other mistakes in the documentation so I can fix them!
About the examples, thanks for the feedback. I thought we had some examples out there, but apparently we have none. I'll work on that!