From: Matthias A. <mat...@gm...> - 2022-10-22 12:38:26
|
Am 19.10.22 um 12:35 schrieb rbell--- via Fetchmail-users: > When I run it I get: > > File "/home/russell/bin/emailproxy.py", line 146 > SyntaxError: Non-ASCII character '\xe2' in file /home/russell/bin/emailproxy.py on line 147, but no encoding declared; seehttp://python.org/dev/peps/pep-0263/ for details > > I add: > > # -*- coding: utf-8 -*- > > as the second line, which cures this complaint. > > Then I get: > > File "/home/russell/bin/emailproxy.py", line 16, in <module> > import configparser > ImportError: No module named configparser > > > but there IS a module named configparser. I searched on the Internet, > didn't find a cure. I suspect it's a simple question - when it comes > to Python, I'm a simpleton. > Russell, there may be confusion around Python versions 2 and 3. A configparser module for Python 2 will not satisfy a Python 3 email-oauth2-proxy. Please ensure you are using a supported Python 3 version (personally I'd say at least 3.8, 3.10 is current, and 3.11 had release candidate status when I checked a few days ago) -- and follow its authors instructions. Also make sure that your python executable is really Python 3, else install the latter and try typing "python3" instead of "python". Your operating system may instead have a way for you to make python v3.x a default version when running "python", but you give too little information on your OS and Python versions or other details of the setup, and my crystal ball is broken and not yet back from repair... https://github.com/simonrob/email-oauth2-proxy#getting-started https://github.com/simonrob/email-oauth2-proxy#dependencies-and-setup Chances are you did NOT install the required packages the same way as explained there: > [...] from a terminal, install the script's requirements: |python -m > pip install -r requirements.txt|, and start the proxy: |python > emailproxy.py| – a menu bar/taskbar icon should appear. If instead of > the icon you see an error in the terminal, it is likely that your > system is missing dependencies for the |pywebview| or |pystray| > packages. See the dependencies and setup > <https://github.com/simonrob/email-oauth2-proxy#dependencies-and-setup> > section [...] HTH Matthias |