gforsyth / xonda

DEPRECATED: (previously a thin wrapper around conda for xonsh)
BSD 3-Clause "New" or "Revised" License
11 stars 9 forks source link

KeyError: 'Unknown environment variable: $SHELL' #13

Closed asmeurer closed 6 years ago

asmeurer commented 7 years ago

See https://github.com/ergs/rever/issues/22. I am getting this error

Traceback (most recent call last):
  File "/opt/conda/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 13063, in run
    r = self.f(self.args, sp_stdin, sp_stdout, sp_stderr, spec)
  File "/opt/conda/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 12885, in proxy_two
    return f(args, stdin)
  File "/opt/conda/lib/python3.6/site-packages/xontrib/xonda.xsh", line 92, in _xonda
    _activate(args[1])
  File "/opt/conda/lib/python3.6/site-packages/xontrib/xonda.xsh", line 70, in _activate
    $SHELL)
  File "/opt/conda/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 16621, in __getitem__
    raise KeyError(e.format(key))
KeyError: 'Unknown environment variable: $SHELL'
gforsyth commented 7 years ago

Hey @asmeurer -- see #14 for a fix

gforsyth commented 6 years ago

Fixed in #14

pyeguy commented 6 years ago

hmm still getting this on windows 10 :

installed from github repo w/ xip install .

$ conda activate hifan
xonsh: To log full traceback to a file set: $XONSH_TRACEBACK_LOGFILE = <filename>
Traceback (most recent call last):
  File "C:\Users\camer\Anaconda3\lib\site-packages\xonsh\__amalgam__.py", line 13063, in run
    r = self.f(self.args, sp_stdin, sp_stdout, sp_stderr, spec)
  File "C:\Users\camer\Anaconda3\lib\site-packages\xonsh\__amalgam__.py", line 12885, in proxy_two
    return f(args, stdin)
  File "C:\Users\camer\Anaconda3\lib\site-packages\xontrib\xonda.xsh", line 92, in _xonda
    _deactivate()
  File "C:\Users\camer\Anaconda3\lib\site-packages\xontrib\xonda.xsh", line 70, in _activate
    print("No environment '{}' found".format(env_name))
  File "C:\Users\camer\Anaconda3\lib\site-packages\xonsh\__amalgam__.py", line 16621, in __getitem__
    raise KeyError(e.format(key))
KeyError: 'Unknown environment variable: $SHELL'
pyeguy commented 6 years ago

hmm actually seems to be only in combination with a autoxsh script...

gforsyth commented 6 years ago

Hey @pyeguy -- sorry, that's because I never put out a new release after adding a fix. Doing that now.

gforsyth commented 6 years ago

Hey @pyeguy -- if you upgrade xonda it should stop complaining about $SHELL but let me know if it doesn't. Thanks.