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

import error #14

Open
xinlia opened this issue Feb 13, 2023 · 1 comment
Open

import error #14

xinlia opened this issue Feb 13, 2023 · 1 comment

Comments

@xinlia
Copy link

xinlia commented Feb 13, 2023

I install this package on python 3.7.0 with pip install cobrakbase.
But when I import it import cobrakbase, an error happend.

c:\Users\vickenlee\AppData\Local\Programs\Python\Python37\lib\site-packages\cobrakbase\Workspace\WorkspaceClient.py in
10 # the following is a hack to get the baseclient to import whether we're in a
11 # package or not. This makes pep8 unhappy hence the annotations.
---> 12 from cobrakbase.Workspace.baseclient import BaseClient as _BaseClient
13 #try:
14 # # baseclient and this client are in a package
...
--> 678 raise KeyError(key) from None
679 return self.decodevalue(value)
680

KeyError: 'HOME'

@Fxe
Copy link
Owner

Fxe commented Feb 14, 2023

You need to setup a HOME environmental variable for bash: export HOME=<your home folder> or use python import os to setup HOME variable https://stackoverflow.com/questions/5971312/how-to-set-environment-variables-in-python
If you use python this has to be done before import cobrakbase

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