Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cms burn branch windows - crypt is not supported on windows #22

Closed
jpfleischer opened this issue Apr 16, 2022 · 2 comments
Closed

cms burn branch windows - crypt is not supported on windows #22

jpfleischer opened this issue Apr 16, 2022 · 2 comments

Comments

@jpfleischer
Copy link
Member

When attempting cms burn branch windows on Windows 10, the following output is received:

Traceback (most recent call last):
  File "C:\Users\Sledgehammer\AppData\Local\Programs\Python\Python310\lib\crypt.py", line 6, in <module>
    import _crypt
ModuleNotFoundError: No module named '_crypt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Sledgehammer\AppData\Local\Programs\Python\Python310\lib\pydoc.py", line 439, in safeimport
    module = __import__(path)
  File "C:\Users\Sledgehammer\cloudmesh-pi-burn\cloudmesh\burn\command\burn.py", line 7, in <module>
    from cloudmesh.burn.burner.Burner import Burner
  File "C:\Users\Sledgehammer\cloudmesh-pi-burn\cloudmesh\burn\burner\Burner.py", line 4, in <module>
    from cloudmesh.burn.burner.raspberryos import Burner as RaspberryOsBurner
  File "C:\Users\Sledgehammer\cloudmesh-pi-burn\cloudmesh\burn\burner\raspberryos.py", line 1, in <module>
    import crypt
  File "C:\Users\Sledgehammer\AppData\Local\Programs\Python\Python310\lib\crypt.py", line 9, in <module>
    raise ImportError("The crypt module is not supported on Windows")
ImportError: The crypt module is not supported on Windows

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Sledgehammer\cloudmesh-cmd5\cloudmesh\shell\shell.py", line 170, in <module>
    Plugin.load([name])
  File "C:\Users\Sledgehammer\cloudmesh-cmd5\cloudmesh\shell\shell.py", line 145, in load
    commands = [pydoc.locate(x) for x in classes]
  File "C:\Users\Sledgehammer\cloudmesh-cmd5\cloudmesh\shell\shell.py", line 145, in <listcomp>
    commands = [pydoc.locate(x) for x in classes]
  File "C:\Users\Sledgehammer\AppData\Local\Programs\Python\Python310\lib\pydoc.py", line 1719, in locate
    nextmodule = safeimport('.'.join(parts[:n+1]), forceload)
  File "C:\Users\Sledgehammer\AppData\Local\Programs\Python\Python310\lib\pydoc.py", line 454, in safeimport
    raise ErrorDuringImport(path, sys.exc_info())
pydoc.ErrorDuringImport: problem in cloudmesh.burn.command.burn - ImportError: The crypt module is not supported on Windows

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Sledgehammer\AppData\Local\Programs\Python\Python310\lib\crypt.py", line 6, in <module>
    import _crypt
ModuleNotFoundError: No module named '_crypt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Sledgehammer\AppData\Local\Programs\Python\Python310\lib\pydoc.py", line 439, in safeimport
    module = __import__(path)
  File "C:\Users\Sledgehammer\cloudmesh-pi-burn\cloudmesh\burn\command\burn.py", line 7, in <module>
    from cloudmesh.burn.burner.Burner import Burner
  File "C:\Users\Sledgehammer\cloudmesh-pi-burn\cloudmesh\burn\burner\Burner.py", line 4, in <module>
    from cloudmesh.burn.burner.raspberryos import Burner as RaspberryOsBurner
  File "C:\Users\Sledgehammer\cloudmesh-pi-burn\cloudmesh\burn\burner\raspberryos.py", line 1, in <module>
    import crypt
  File "C:\Users\Sledgehammer\AppData\Local\Programs\Python\Python310\lib\crypt.py", line 9, in <module>
    raise ImportError("The crypt module is not supported on Windows")
ImportError: The crypt module is not supported on Windows

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Sledgehammer\ENV3\Scripts\cms-script.py", line 33, in <module>
    sys.exit(load_entry_point('cloudmesh-cmd5', 'console_scripts', 'cms')())
  File "C:\Users\Sledgehammer\ENV3\Scripts\cms-script.py", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "C:\Users\Sledgehammer\AppData\Local\Programs\Python\Python310\lib\importlib\metadata\__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "C:\Users\Sledgehammer\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\Sledgehammer\cloudmesh-cmd5\cloudmesh\shell\shell.py", line 172, in <module>
    Plugin.load()
  File "C:\Users\Sledgehammer\cloudmesh-cmd5\cloudmesh\shell\shell.py", line 145, in load
    commands = [pydoc.locate(x) for x in classes]
  File "C:\Users\Sledgehammer\cloudmesh-cmd5\cloudmesh\shell\shell.py", line 145, in <listcomp>
    commands = [pydoc.locate(x) for x in classes]
  File "C:\Users\Sledgehammer\AppData\Local\Programs\Python\Python310\lib\pydoc.py", line 1719, in locate
    nextmodule = safeimport('.'.join(parts[:n+1]), forceload)
  File "C:\Users\Sledgehammer\AppData\Local\Programs\Python\Python310\lib\pydoc.py", line 454, in safeimport
    raise ErrorDuringImport(path, sys.exc_info())
pydoc.ErrorDuringImport: problem in cloudmesh.burn.command.burn - ImportError: The crypt module is not supported on Windows
(ENV3)
@laszewsk
Copy link
Member

wherever its used you need to mask the import such as

if windows:
import crypt

or

try:
import whatever
except Exception as e:
print ("if you find a crypt error do something else")

@jpfleischer
Copy link
Member Author

the problem was that i did not update and was using an outdated version of pi burn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants