(2023-02-11) My Atom/RSS feed is broken

I just realized my AtomStandards (near-RSS) feed is broken. Set up back in 2014 at Flask For Wiki Engine. Was working at (2019-04-15) Fixing RSS/Atom Feed. Maybe whacked by (2021-03-01) Massive Server Upgrade? Probably - web.archive has good snapshot from Jan19'2021, then bad on Jul21'2021.

 File "/srv/www/wikiflux.net/app/wikiweb.py", line 272, in recent_feed
    feed = AtomFeed('Recent Articles',
NameError: global name 'AtomFeed' is not defined

See that I have commented out the line of code with from werkzeug.contrib.atom import AtomFeed

Uncomment → ImportError: No module named contrib.atom

Looks like werkzeug got re-organized. I had discovered this at (2021-02-07) Migrating to Python3 but I think moving backwards changed things....

So what versions of things am I running here on Linode?

flask --version
Python 2.7.6
Flask 1.1.2
Werkzeug 1.0.1

In my python3 environment I switched to feedgen and adjusted my code. I saw some indication it might work with Python2, but I'm not sure about that.... hmm, this page certain aims for that. I check, don't have feedgen there now. But will my py3-feedgen code work with my p2 code, or are there other differences that came along the way....

pip install feedgen → nope won't work because 2.7 is so dead. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Linked page says pip 20.3 was the last version of pip that supported Python 2.

But pip -Vpip 20.3.4 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)

Looking more closely at the many errors, I find SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. which this page says means: you're using a Python version older than 2.7.9. To fix this, install these three Python packages to update older libraries.... pip install pyOpenSSL ndg-httpsclient pyasn1 So I do that, get Requirement already satisfied for each.

  • Also see error A true SSLContext object is not available.
  • ugh OpenSSL again

Try opposite approach, downgrading Werkzeug: pip install "Werkzeug<1" → same errors.

Return to previous approach, note that being on Ubuntu might require extra step. So do apt-get install libffi-dev libssl-dev then repeat pip install pyOpenSSL ndg-httpsclient pyasn1 seem to get same result.

Apr07'2024

  • decide to try different approach: just work directly on Linode...
  • /srv/www/wikiflux.net
  • pip install feedgen -> many errors because of old Python, SSL issues....
  • can I download source and install from local?
  • download file to server, do tar -xvzf feedgen-1.0.0.tar.gz
  • python -m pip install feedgen-1.0.0 -> same pip/SSL errors
  • python -m pip install /srv/www/wikiflux.net/app/feedgen-1.0.0 -> same errors
    • it smells like it's trying to grab feedgen from net instead of using local copy...
  • this seems specific but uggghhhh
  • I wonder if it would just be easier to upgrade this server to Py3 - issues at (2021-03-01) Massive Server Upgrade may have been mostly around the wildcard-cert stuff, and if I'm not bothering with that here, maybe it won't be bad
  • or maybe I should just take another switch at the moving this stuff over to my DigitalOean, which had its own issues - (2022-08-25) Move webseitz to DigitalOcean. I hate computers.

Edited:    |       |    Search Twitter for discussion