donno2048 / Rosehip

Reliable Operating System by Elisha Hollander Implemented in Python
https://repl.it/@donno2048/Rosehip-demo#README.md
MIT License
3 stars 0 forks source link

BUG FOUND WHEN USING SPEAKER #2

Closed Lainad27 closed 2 years ago

Lainad27 commented 4 years ago

When I type "hello" in the speaker app, the speaker doesn't play a sound and the operating system crashes with the error:

File "os.py", line 59, in <module>
    OS().run()
  File "os.py", line 48, in run
    self.MANAGER.process_events(event)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\pygame_gui\ui_manager.py", line 206, in process_events
    consumed_event = ui_element.process_event(event)
  File "C:\Users\user\Downloads\Rosehip-master\Rosehip-master\apps\util\speaker\_init_.py", line 6, in process_event
    if event.type == pygame.USEREVENT and event.ui_element == self.input and event.user_type == pygame_gui.UI_TEXT_ENTRY_FINISHED and (self.speakthrd is None or not self.speakthrd.is_alive()) and self.input.get_text!="":self.engine.say(self.input.get_text);self.speakthrd = threading.Thread(target=self.engine.runAndWait, args=());self.speakthrd.start();self.label.set_text(self.input.get_text);self.input.set_text("")
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\pygame_gui\elements\ui_label.py", line 75, in set_text
    self.rebuild()
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\pygame_gui\elements\ui_label.py", line 83, in rebuild
    text_size = self.font.size(self.text)
TypeError: text must be a unicode or bytes

I ran the program on a laptop.

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.97. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.