News How to Create Web Apps with Python, HTML and Thonny

D

Deleted member 14196

Guest
Sep 4, 2022
4
0
10
Looked interesting, but way over my head, I gave it a try. I got the following errors and don't have a clue. I sent them to the feedparser author of possible help.
I'm still at the beginner level trying to get cute graphics and menus on the screen with TKinter. :)

Traceback (most recent call last):
File "C:\Users\Bo\Downloads\Adafruit_CircuitPython_MatrixKeypad-main\examples\RSS-Feed-Reader.py", line 3, in <module>
import feedparser
File "C:\Users\Bo\AppData\Roaming\Python\Python310\site-packages\feedparser\init.py", line 39, in <module>
from . import api
File "C:\Users\Bo\AppData\Roaming\Python\Python310\site-packages\feedparser\api.py", line 54, in <module>
from . import http
File "C:\Users\Bo\AppData\Roaming\Python\Python310\site-packages\feedparser\http.py", line 44, in <module>
_base64decode = getattr(base64, 'decodebytes', base64.decodestring)
AttributeError: module 'base64' has no attribute 'decodestring'

73, Bo W4GHV since '54
 
Sep 4, 2022
4
0
10
Thanks! Strangely the program had a comment to that change but failed to fix it!🤔
Fixing it in 2 files fixed it and it 'ran'
However the web page results has a list of new errors!
I'll list them but don't worry/bother if fixing it is a mess.
Again over my head but looked like one I could get going. 73. Bo

Traceback (most recent call last):
File "C:\Users\Bo\AppData\Roaming\Python\Python310\site-packages\pywebio\session\threadbased.py", line 86, in main_task
target()
File "C:\Users\Bo\Downloads\Adafruit_CircuitPython_MatrixKeypad-main\examples\RSS-Feed-Reader.py", line 5, in main
stock = feedparser.parse('https://rpilocator.com/feed/')
File "C:\Users\Bo\AppData\Roaming\Python\Python310\site-packages\feedparser\api.py", line 238, in parse
data = convert_to_utf8(result['headers'], data, result)
File "C:\Users\Bo\AppData\Roaming\Python\Python310\site-packages\feedparser\encodings.py", line 244, in convert_to_utf8
if isinstance(proposed_encoding, collections.Callable):
AttributeError: module 'collections' has no attribute 'Callable'
 
Sep 4, 2022
4
0
10
Thanks! Strangely the program had a comment to that change but failed to fix it!🤔
Fixing it in 2 files fixed it and it 'ran'
However the web page results has a list of new errors!
I'll list them but don't worry/bother if fixing it is a mess.
Again over my head but looked like one I could get going. 73. Bo

Traceback (most recent call last):
File "C:\Users\Bo\AppData\Roaming\Python\Python310\site-packages\pywebio\session\threadbased.py", line 86, in main_task
target()
File "C:\Users\Bo\Downloads\Adafruit_CircuitPython_MatrixKeypad-main\examples\RSS-Feed-Reader.py", line 5, in main
stock = feedparser.parse('https://rpilocator.com/feed/')
File "C:\Users\Bo\AppData\Roaming\Python\Python310\site-packages\feedparser\api.py", line 238, in parse
data = convert_to_utf8(result['headers'], data, result)
File "C:\Users\Bo\AppData\Roaming\Python\Python310\site-packages\feedparser\encodings.py", line 244, in convert_to_utf8
if isinstance(proposed_encoding, collections.Callable):
AttributeError: module 'collections' has no attribute 'Callable'
I traced down all the comments and it looks like the problem is with the https://rpilocator.com/feed error listed.
Headed there now. A 'RPI locator' will find about 6 of them here.😂
 
Sep 4, 2022
4
0
10
I traced down all the comments and it looks like the problem is with the https://rpilocator.com/feed error listed.
Headed there now. A 'RPI locator' will find about 6 of them here.😂
WAIT! How dumb I am. I actually have closer to 10 Pi's and need NO more.
I was thinking it could be easily modified to do for 'fun' /educational things.
I probably should quit this one.

Earlier I struck out just trying to scrape the solar data from https://www.hamqsl.com for a cute display.

I am succeeding in getting a Pi, tkinter,Python, arduino, stepper motor controlling a mag loop antenna.
 
Sep 5, 2022
2
0
10
Thanks! Strangely the program had a comment to that change but failed to fix it!🤔
Fixing it in 2 files fixed it and it 'ran'
However the web page results has a list of new errors!
I'll list them but don't worry/bother if fixing it is a mess.
Again over my head but looked like one I could get going. 73. Bo

Traceback (most recent call last):
File "C:\Users\Bo\AppData\Roaming\Python\Python310\site-packages\pywebio\session\threadbased.py", line 86, in main_task
target()
File "C:\Users\Bo\Downloads\Adafruit_CircuitPython_MatrixKeypad-main\examples\RSS-Feed-Reader.py", line 5, in main
stock = feedparser.parse('https://rpilocator.com/feed/')
File "C:\Users\Bo\AppData\Roaming\Python\Python310\site-packages\feedparser\api.py", line 238, in parse
data = convert_to_utf8(result['headers'], data, result)
File "C:\Users\Bo\AppData\Roaming\Python\Python310\site-packages\feedparser\encodings.py", line 244, in convert_to_utf8
if isinstance(proposed_encoding, collections.Callable):
AttributeError: module 'collections' has no attribute 'Callable'


AttributeError: module 'collections' has no attribute 'Callable'

Removed from v3.10


In the article the author uses Thonny 4.0.0.

Thonny 4.0.0 comes with Python 3.10.6 - this script would've NEVER worked without any error! o_O