FormerLurker / Octolapse

Stabilized timelapses for Octoprint
GNU Affero General Public License v3.0
639 stars 99 forks source link

Cannot install octolapse getting error about AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'? #954

Open Firenyth opened 3 months ago

Firenyth commented 3 months ago

If this is a feature request describe it here

_REPLACE_THISFEATURE_REQUEST_DESCRIPTION_GOES_HERE

Version of Octolapse

Octolapse Version: V0.4.5

Version of OctoPrint

OctoPrint Version: 1.10.2

When you ran into the problem, did you have diagnostic logging enabled?

Diagnostic Logging was Enabled: NO

What were you doing when the problem occurred

  1. Trying to instll octoprint from repo
  2. get an error message module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?

What should have happened?

Octoprint should have been installed

What happened instead?

I get an error message module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?

Operating System running OctoPrint and Octolapse

OS Name: Ubuntu Os Version: 24.04

Printer model & used firmware incl. version

Printer Model: _REPLACE_THISPRINTER_MODEL_GOES_HERE Printer Firmware Version: _REPLACE_THISPRINTER_FIRMWARE_VERSION_GOES_HERE

Browser and version of browser, operating system running browser

Browser: _REPLACE_THISBROWSER_VERSION_GOES_HERE Browser OS: _REPLACE_THISBROWSER_OS_GOES_HERE

Link to the gcode file you were printing when the problem occurred

Link to Gcode File: _REPLACE_THISGCODE_FILE_LINK_GOES_HERE

Link to settings.json

Link to settings.json with all passwords removed: _REPLACE_THISSETTINGS_JSON_LINK_GOES_HERE

Link to plugin_octolapse.log

Link to plugin_octolapse.log: LINK_GOES_HERE

Link to octoprint.log

Link to octoprint.log: _REPLACE_THISLINK_GOES_HERE

Link to contents of Javascript console in the browser

Link to javascript console output: _REPLACE_THISLINK_GOES_HERE

Screenshots and/or videos of the problem:

Screenshot/Video Links: _REPLACE_THISLINKs_GO_HERE

Please consider becoming a patron

If you like this project, please support my work by becoming a patron, and consider adding a 'star' to the repository. It takes a lot of time and effort to maintain the project and respond to issues. The cost of test prints, software, cameras, printer parts, etc. can quickly add up, so every bit helps.

You can find various videos and tutorials by subscribing to my Youtube channel. You can also follow me on Twitter.

full log from octoprint Installing plugin "Octolapse" from https://github.com/FormerLurker/Octolapse/archive/master.zip... /home/firenyth/OctoPrint/bin/python3 -m pip --disable-pip-version-check install file:///tmp/tmpr45yv_xi/Octolapse-master.zip --no-cache-dir Processing /tmp/tmpr45yv_xi/Octolapse-master.zip Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'error' error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [15 lines of output] /tmp/pip-req-build-zxxzdali/versioneer.py:421: SyntaxWarning: invalid escape sequence '\s' LONG_VERSION_PY['git'] = ''' Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-req-build-zxxzdali/setup.py", line 25, in plugin_version = NumberedVersion.clean_version(versioneer.get_versions(verbose=True)["version"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-req-build-zxxzdali/versioneer.py", line 1412, in get_versions cfg = get_config_from_root(root) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-req-build-zxxzdali/versioneer.py", line 342, in get_config_from_root parser = configparser.SafeConfigParser() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'? [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details. Error! Could not parse output from pip, see plugin_pluginmanager_console.log for generated output

Firenyth commented 3 months ago

Found my solution was an issue with versioneer file same as this previous bug report [[Bug]: Cannot install on Python 3.12] https://github.com/FormerLurker/Octolapse/issues/949

Had to rebuild the versioneer file from source https://github.com/python-versioneer/python-versioneer

then install the plugin from file with new versioneer.py file

I have attached a copy of the versioneer.py file I generated and used for anyone with similar issue.

versioneer.zip

alien8r commented 3 months ago

Firenyth, If I followed your message correctly you: 1> downloaded versioneer source and built it locally 2> downloaded Octolapse source 3> Located versioneer.py in the Octolapse source directory tree and replaced it with your version of versioneer.py 4> Successfully built Octolapse

Are those the steps to follow?

Firenyth commented 3 months ago

Firenyth,

If I followed your message correctly you: 1> downloaded versioneer source and built it locally 2> downloaded Octolapse source 3> Located versioneer.py in the Octolapse source directory tree and replaced it with your version of versioneer.py 4> Successfully built Octolapse Are those the steps to follow?

If your trying to get it to work you can try these steps

  1. Download octolapse source
  2. Download the my versioneer.py
  3. Replace versioneer.py in octolapse with mine
  4. Rezip octolapse and install from file on octoprint

The alternative is to generate your own versioneer.py file using versioneer I accomplished this by installing versioneer and running it from the octolapse directory after downloading it.