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

Environment variable 'USER' not found #80

Closed
xinguo2 opened this issue Jan 8, 2022 · 9 comments
Closed

Environment variable 'USER' not found #80

xinguo2 opened this issue Jan 8, 2022 · 9 comments

Comments

@xinguo2
Copy link

xinguo2 commented Jan 8, 2022

Thanks for your share! When I run python bin/train.py -cn lama-fourier location=my_dataset data.batch_size=10,the errors occured:
omegaconf.errors.InterpolationResolutionError: ValidationError raised while resolving interpolation: Environment variable 'USER' not found
full_key: hydra.run.dir
object_type=dict

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "bin/train.py", line 74, in
main()
File "/root/lama-main/saicinpainting/utils.py", line 163, in new_main
main_func(*args, **kwargs)
File "/root/.local/lib/python3.7/site-packages/hydra/main.py", line 53, in decorated_main
config_name=config_name,
File "/root/.local/lib/python3.7/site-packages/hydra/_internal/utils.py", line 368, in _run_hydra
lambda: hydra.run(
File "/root/.local/lib/python3.7/site-packages/hydra/_internal/utils.py", line 270, in run_and_report
cur.tb_lasti = iter_tb.tb_lasti
AttributeError: 'NoneType' object has no attribute 'tb_lasti'

Could you tell me how to solve it, thanks!

@vonchenplus
Copy link

You just need to export USER environment variable.

@senya-ashukha
Copy link
Collaborator

Hi @xinguo2, yep recommendation by @vonchenplus is valid;

@hanp0
Copy link

hanp0 commented Mar 21, 2022

You just need to export USER environment variable.

Would you mind explaining how to do this?

@windj007
Copy link
Collaborator

just export USER=$(whoami) ; ./train.py ...

@micklexqg
Copy link

just export USER=$(whoami) ; ./train.py ...

similar problem, is it needed to export USER=$(whoami) for windows? if needed, how to export it?

@windj007
Copy link
Collaborator

windj007 commented May 6, 2022

I do not have a Windows machine, but it is easy to google how to set environment variables in windows cmd. If you're the only user of the machine, then there is no need to use whoami command (which returns name of the current user) - just set USER to any value you want.

@micklexqg
Copy link

export USER environment variable.

how to export? i do not know what is the USER environment variable.

@micklexqg
Copy link

I run export TORCH_HOME=$(pwd) && export PYTHONPATH=$(pwd)
but still the same error.

@micklexqg
Copy link

@windj007
Hi, thanks for your nice work,
image
the command of export TORCH_HOME=$(pwd) && export PYTHONPATH=$(pwd) seems not work...
so what should i do?

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

6 participants