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

Windows: Command line issue #144

Open
Heisenberg3666 opened this issue Nov 1, 2020 · 5 comments
Open

Windows: Command line issue #144

Heisenberg3666 opened this issue Nov 1, 2020 · 5 comments
Labels

Comments

@Heisenberg3666
Copy link

Heisenberg3666 commented Nov 1, 2020

Hey, I'm not sure if this is the right place to ask for help but I'm trying to create a mail server and I cant run salmon gen myproject in the command line to start. I'm getting the error
`Salmon : The term 'Salmon' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • Salmon gen mail-server
  •   + CategoryInfo          : ObjectNotFound: (Salmon:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException`
    

could someone help me with this? Thanks!

@moggers87
Copy link
Owner

According to Google, that error means you're using Windows. I'm not really familiar with Windows so I can't really help you, but I'd guess that you don't have salmon in your PATH. What you would need to add to PATH to get it working would depend on how and where you have installed Salmon.

For what it's worth, I don't know of anyone else using Salmon on Windows so you may encounter other issues even if you fix this one.

@moggers87 moggers87 changed the title Command line issue Windows: Command line issue Nov 1, 2020
@Heisenberg3666
Copy link
Author

I have added it to the PATH is there anything else i should do because it still isn't working? Thanks!

@moggers87
Copy link
Owner

I'm not sure I'll be able to help much, but in case someone else stumbles across this bug report it would be helpful to know the following:

  • What version of Windows you're using
  • What shell (and what version) you're using
  • What version of Python you have installed
  • If you're using virtualenv or not
  • The exact command you used to install Salmon

@GuiTaek
Copy link

GuiTaek commented Dec 30, 2022

Stumbling across this bug report and giving the demanded informations:

  • Windows 10 Pro, 21H2 / Microsoft Windows [version 10.0.19044.2364]
  • Terminal / cmd.exe / not PowerShell
  • Python 3.8.10
  • virtualenv is used
  • python -m pip install salmon-mail

And additionally I give the error that salmon gen myproject gives:

Traceback (most recent call last):
  File "path\to\venv\Scripts\salmon-script.py", line 33, in <module>
    sys.exit(load_entry_point('salmon-mail==3.2.0', 'console_scripts', 'salmon')())
  File "path\to\venv\Scripts\salmon-script.py", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "path\to\Python\Python38\lib\importlib\metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "path\to\Python\Python38\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "path\to\venv\lib\site-packages\salmon\commands.py", line 20, in <module>
    from salmon import routing, server, utils
  File "path\to\venv\lib\site-packages\salmon\utils.py", line 16, in <module>
    import daemon
  File "path\to\venv\lib\site-packages\daemon\__init__.py", line 33, in <module>
    from .daemon import DaemonContext
  File "path\to\venv\lib\site-packages\daemon\daemon.py", line 13, in <module>
    import pwd
ModuleNotFoundError: No module named 'pwd'

and as the error is outside of your library inside the import statements I guess it's not your fault?

As a note, every "path\to" path is santinized path -- I don't want to share these paths as they are sensible.

If it helps you debugging, you could use VirtualBox with a guest windows. I'm happy to assist you with installing the correct virtual machine as best as I can (although I don't have much experience with linux other than the terminal)

@moggers87
Copy link
Owner

Yeah, you can't run Salmon daemonised under Windows due to python-daemon not supporting Windows at all.

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

No branches or pull requests

3 participants