AttributeError: 'bound_method' object has no attribute 'stamp' in farm_ng.display

  • What package and version are you using ?
    I’m using the farm_ng Amiga Development Kit, following the instructions from the Hello Main Loop example. The specific hardware is an Adafruit Feather M4 CAN with SAM E51J19A.

  • Please, describe the issues you are seeing ?

I encountered the following error while running my code:
No Display: no module named ‘farm_ng.display’
node_id = 0x e
get_board_type() Adafruit Feather M4 CAN with same51j19a
Traceback (most recent call last):
File “code.py”, line 88, in
File “code.py”, line 85, in main
File “farm_ng/utils/main_loop.py”, line 335, in loop
File “farm_ng/utils/main_loop.py”, line 327, in _loop
File “farm_ng/utils/main_loop.py”, line 281, in iter
File “farm_ng/utils/main_loop.py”, line 182, in poll_can
File “farm_ng/utils/main_loop.py”, line 164, in handle_message
File “code.py”, line 49, in _handle_amiga_tpdo1
File “farm_ng/utils/packet.py”, line 289, in str
AttributeError: ‘bound_method’ object has no attribute ‘stamp’
Code done running.

I followed the steps in the “Hello Main Loop” example documentation, but I keep encountering this AttributeError related to the stamp attribute.

Steps I followed:

  1. Set up the environment as described in the Hello Main Loop example.
  2. Used the provided MainLoop class and implemented message handling in handle_message.
  3. Encountered an issue when running the code, indicating that there’s a problem with how the stamp method/attribute is being accessed.

Could someone assist me in resolving this issue or provide guidance on what I might be missing?

Any additional information or recommendations would be greatly appreciated!

Thanks in advance!

Hey @faraz, I will check the example here and try to reproduce the error and get back to you tomorrow!

Did you solve it. Then could you please share me how you solved it. Same problem shown in my case also.
Thanks,
Asifur

There should be a print line in the main code, just comment it out and then it should work.

I cant find that. Could you please see from here: amiga-dev-kit/circuitpy/lib/farm_ng/utils at main · farm-ng/amiga-dev-kit · GitHub and tell me if you remember something what should I do then it will be a big help for me.

Thanks,
Asifur

You need to update the code.py file in the main_loop. This file:

Comment out the line:49
print(self.amiga_tpdo1, end=“\r”)

And then it should work.

Thank you Faraz for the help but it didnt work also. Its showing me now this error. If you have suggestions for me in this please let me know.

Thanks
Asifur

Actually, it is working now, these are just some warnings, not the errors. You should be able to send the commands through the keyboard as specified in the example.

1 Like