I had to upgrade and re-install the OS on one of my Raspberry Pi’s. A script that I wrote now fails, and when I tried this example code (which i used as the basis for my Blynk control code), it fails with the same error.
File “blynk_python_non_blocking.py”, line 19, in BlynkLoop
blynk.set_user_task(my_user_task, 1000)
AttributeError: Blynk instance has no attribute ‘set_user_task’
I only see 2 that need to be specified: task, and second_period. You don’t have to explicitly pass “self” (it’s bound to the instance) and there are defaults for initial_state and authenticated.
Can you just check the BlinkLib.py file you have to make sure you do have either add_user_task or set_user_task defined in there?
Thanks for all the help, but I finally gave up on that example.
I don’t need to have Blynk running periodic tasks, so I just put Blynk.run() in a thread with a sleep time of 1 second, and that worked.
I’m going to blame the switch to the new platform for the dispiriting lack of appropriate responses to my brilliant setup. I expect much better performance next time someone quotes Monty Python. C’mon people! Get it together!