bitsy-ai / printnanny-os

Image repository, change logs, and issue tracking for PrintNanny OS
GNU Affero General Public License v3.0
23 stars 2 forks source link

New OctoPrint installations fail with error: module 'pkg_resources' has no attribute 'declare_namespace' #299

Closed leigh-johnson closed 1 year ago

leigh-johnson commented 1 year ago

Describe the bug

I'm getting reports that new OctoPrint installations are failing with the following error:

Apr 25 09:29:43 dev-v6 octoprint[739]:     from octoprint.plugins.backup import InsufficientSpace
 in <module>
Apr 25 09:29:43 dev-v6 octoprint[739]:     from octoprint.server import NO_CONTENT
dule>
Apr 25 09:29:43 dev-v6 octoprint[739]:     from octoprint.server import util
n <module>
Apr 25 09:29:43 dev-v6 octoprint[739]:     from . import flask, sockjs, tornado, watchdog  # noqa: F401
<module>
Apr 25 09:29:43 dev-v6 octoprint[739]:     import octoprint.vendor.sockjs.tornado
in <module>
Apr 25 09:29:43 dev-v6 octoprint[739]:     __import__('pkg_resources').declare_namespace(__name__)
Apr 25 09:29:43 dev-v6 octoprint[739]: AttributeError: module 'pkg_resources' has no attribute 'declare_namespace'
dev-v6:~$ python3 -m pip show octoprint
Name: OctoPrint
Version: 1.8.7
Summary: The snappy web interface for your 3D printer
Home-page: https://octoprint.org
Author: Gina Häußge
Author-email: gina@octoprint.org
License: GNU Affero General Public License v3
Location: /usr/lib/python3.10/site-packages
Requires: argon2_cffi, blinker, cachelib, Click, colorlog, emoji, feedparser, filetype, flask, Flask-Assets, Flask-Babel, Flask-Limiter, Flask-Login, frozendict, future, markdown, netaddr, netifaces, OctoPrint-FileCheck, OctoPrint-FirmwareCheck, OctoPrint-PiSupport, passlib, pathvalidate, pkginfo, psutil, pylru, pyserial, PyYAML, regex, requests, sarge, semantic_version, sentry-sdk, tornado, unidecode, watchdog, websocket-client, werkzeug, wrapt, zeroconf, zipstream-ng
Required-by: OctoPrint-Nanny

Issue.txt

-----------------------
Build Info:  |
-----------------------
IMAGE_NAME = printnanny-release-image-raspberrypi4-64-20230331234917
DISTRO_PRETTY = PrintNanny Linux 0.6.6 (Feldspar)
VARIANT_NAME = PrintNanny OS Core
VARIANT_ID = core
DISTRO = printnanny
DISTRO_NAME = PrintNanny Linux
DISTRO_VERSION = 0.6.6
DISTRO_CODENAME = Feldspar
ID_LIKE = BitsyLinux
HOME_URL = https://printnanny.ai
BUG_REPORT_URL = https://github.com/bitsy-ai/printnanny-os/issues
YOCTO_VERSION = 4.1.2
YOCTO_CODENAME = Langdale
MACHINE = raspberrypi4-64
TUNE_PKGARCH = cortexa72
-----------------------
Layer Revisions:      |
-----------------------
meta              = langdale:f59aa3752dbc5552469207894bea9c01bd68fb6e
meta-poky         = langdale:f59aa3752dbc5552469207894bea9c01bd68fb6e
meta-yocto-bsp    = langdale:f59aa3752dbc5552469207894bea9c01bd68fb6e
meta-raspberrypi  = langdale-libcamera-fix:99f5a91d9d4b34ff8c214cf61cd12f375da1a76a
meta-oe           = langdale:f8cb46d803190bb02085c8a7d20957a71d32f311
meta-python       = langdale:f8cb46d803190bb02085c8a7d20957a71d32f311
meta-multimedia   = langdale:f8cb46d803190bb02085c8a7d20957a71d32f311
meta-bitsy        = main:650621d1f021abe86ef7718e5354234d7a32b6b2
meta-neural-network = mickledore:f19fa74c2f4c868eda1c48d709b66848f9cca5e8
meta-printnanny   = main:650621d1f021abe86ef7718e5354234d7a32b6b2
meta-networking   = langdale:f8cb46d803190bb02085c8a7d20957a71d32f311
meta-filesystems  = langdale:f8cb46d803190bb02085c8a7d20957a71d32f311
meta-initramfs    = langdale:f8cb46d803190bb02085c8a7d20957a71d32f311
meta-webserver    = langdale:f8cb46d803190bb02085c8a7d20957a71d32f311
meta-swupdate     = mickledore:c47a10be18412919f4c7041be05509ba97ac79f4
meta-microcontroller = mickledore:a848733698649628d0c3e34ae04ced0ee6ce3aee
workspace         = langdale:f59aa3752dbc5552469207894bea9c01bd68fb6e
leigh-johnson commented 1 year ago

Google-fu shows this fixed by upgrading to version 67.x.x of setuptools.

Current pip / setuptools versions:

dev-v6:~$ python3 -m pip show setuptools
Name: setuptools
Version: 65.5.1
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
License:
Location: /usr/lib/python3.10/site-packages
Requires:
Required-by: limits, wheel
dev-v6:~$ python3 -m pip show pip
Name: pip
Version: 22.2.2
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: distutils-sig@python.org
License: MIT
Location: /usr/lib/python3.10/site-packages
Requires:
Required-by:

Confirming the issue is resolved after I manually upgrade to setuptools==67.7.2 - I'll get a patch out for PNOS today.

leigh-johnson commented 1 year ago

👍 Fix confirmed. I'll release this in v0.6.7