You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Salt Package Manager (SPM) is using a deprecated Python method called os.getcwdu(), which used to exist in Python 2.x, but not anymore on Python 3.x. This causes the following exception when calling spm create_repo . on SPM version 3004:
[ERROR ] An un-handled exception was caught by salt's global exception handler:
AttributeError: module 'os' has no attribute 'getcwdu'
Traceback (most recent call last):
File "/usr/bin/spm", line 11, in <module>
salt_spm()
File "/usr/lib/python3.6/site-packages/salt/scripts.py", line 533, in salt_spm
spm.run()
File "/usr/lib/python3.6/site-packages/salt/cli/spm.py", line 38, in run
client.run(self.args)
File "/usr/lib/python3.6/site-packages/salt/spm/__init__.py", line 129, in run
self._create_repo(args)
File "/usr/lib/python3.6/site-packages/salt/spm/__init__.py", line 750, in _create_repo
repo_path = os.getcwdu()
AttributeError: module 'os' has no attribute 'getcwdu'
Traceback (most recent call last):
File "/usr/bin/spm", line 11, in <module>
salt_spm()
File "/usr/lib/python3.6/site-packages/salt/scripts.py", line 533, in salt_spm
spm.run()
File "/usr/lib/python3.6/site-packages/salt/cli/spm.py", line 38, in run
client.run(self.args)
File "/usr/lib/python3.6/site-packages/salt/spm/__init__.py", line 129, in run
self._create_repo(args)
File "/usr/lib/python3.6/site-packages/salt/spm/__init__.py", line 750, in _create_repo
repo_path = os.getcwdu()
AttributeError: module 'os' has no attribute 'getcwdu'
Setup
Docker container. Image is build with the following Dockerfile:
FROM opensuse/leap
RUN zypper refresh && zypper install -y salt-master
ENTRYPOINT ["sleep","infinity"]
Steps to Reproduce the behavior
Install salt-master
Run spm create_repo . on any directory
Expected behavior
The repository is correctly initialized on the current working directory.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
Salt: 3004Dependency Versions:
cffi: 1.13.2cherrypy: Not Installeddateutil: Not Installeddocker-py: Not Installedgitdb: Not Installedgitpython: Not InstalledJinja2: 2.10.1libgit2: Not InstalledM2Crypto: 0.38.0Mako: Not Installedmsgpack: 0.5.6msgpack-pure: Not Installedmysql-python: Not Installedpycparser: 2.17pycrypto: Not Installedpycryptodome: Not Installedpygit2: Not InstalledPython: 3.6.15 (default, Sep 23 2021, 15:41:43) [GCC]python-gnupg: Not InstalledPyYAML: 5.4.1PyZMQ: 17.1.2smmap: Not Installedtimelib: Not InstalledTornado: 4.5.3ZMQ: 4.2.3System Versions:
dist: opensuse-leap 15.4 locale: UTF-8machine: x86_64release: 5.13.0-51-genericsystem: Linuxversion: openSUSE Leap 15.4
The text was updated successfully, but these errors were encountered:
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!
Description
Salt Package Manager (SPM) is using a deprecated Python method called
os.getcwdu()
, which used to exist in Python 2.x, but not anymore on Python 3.x. This causes the following exception when callingspm create_repo .
on SPM version 3004:Setup
Docker container. Image is build with the following Dockerfile:
Steps to Reproduce the behavior
spm create_repo .
on any directoryExpected behavior
The repository is correctly initialized on the current working directory.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)The text was updated successfully, but these errors were encountered: