rbaltrusch / pygame_examples

A repository for short pygame drafts, examples, tutorials and more!
MIT License
27 stars 12 forks source link

AttributeError: 'int' object has no attribute 'start' #2

Closed good-point-lab closed 2 years ago

good-point-lab commented 2 years ago

Running the event.py example in Python 3.10.1 / OSX 12.1 getting an error in line 37, in __post_init__ self.timer.start() AttributeError: 'int' object has no attribute 'start'

rbaltrusch commented 2 years ago

Hello @good-point-lab , thanks for raising the issue.

This seems to have been left over from slightly rewriting the event handling in the Entity class. I have fixed it in commit 69771b0 and added a blinking screen event to better showcase the functionality in commit 7dda0b9 (current HEAD).

Best, Richard

good-point-lab commented 2 years ago

Hi Richar, Just confirming - everything works. Thank you! I am interested in using the library with rotary encoders, buttons, and other analog inputs for SDRs. Your examples could help me to integrate GPIO events with UI. If you know good examples of using PyGame with RPI GPIO, please let me know.

Alex Greysukh

On Sat, Jan 29, 2022 at 5:42 AM Richard Baltrusch @.***> wrote:

Hello @good-point-lab https://github.com/good-point-lab , thanks for raising the issue.

This seems to have been left over from slightly rewriting the event handling in the Entity class. I have fixed it in commit 69771b0 https://github.com/rbaltrusch/pygame_examples/commit/69771b0bd7930d5e5a423df49f19e1f66ee1e099 and added a blinking screen event to better showcase the functionality in commit 7dda0b9 https://github.com/rbaltrusch/pygame_examples/commit/7dda0b9f8b373650a3d0f4eafe7ab8aa83dd5d86 (current HEAD).

Best, Richard

— Reply to this email directly, view it on GitHub https://github.com/rbaltrusch/pygame_examples/issues/2#issuecomment-1024886497, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCEKLSCCZX4EAQLBGIL7ITUYPABBANCNFSM5NBMYLHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

rbaltrusch commented 2 years ago

Hi Alex,

All I know about SDR is that I read an article about it some 10 years ago :) I havent done pygame on Raspberry Pi yet, but from already came across various forum posts of people that did, so it seems to be possible and used quite a bit. It shouldn't be too hard to interface with the hardware you are describing if wrapping it in a hardware interface, which you then speak to using pygame, although it's been a little while that I've dealt with a hardware project :)

Good luck with your project - if you have any Python or pygame specific issues or questions, drop me a mail 👍

Best, Richard