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

[Bug] Cannot use overrides containing '@' character #1074

Closed
pringshia opened this issue Oct 19, 2020 · 1 comment · Fixed by #1075
Closed

[Bug] Cannot use overrides containing '@' character #1074

pringshia opened this issue Oct 19, 2020 · 1 comment · Fixed by #1075
Labels
bug Something isn't working
Milestone

Comments

@pringshia
Copy link

🐛 Bug

Description

I am unable to override a value that contains the '@' character, e.g. in the case of providing email addresses

To reproduce

Borrowed from #962:

** Minimal Code/Config snippet to reproduce **

# test.py

import hydra

@hydra.main()
def foo(*args, **kargs):
    pass

foo()
$ python test.py +bar=example@example.com

** Stack trace/error message **

LexerNoViableAltException: +bar=example@example.com
                                       ^
See https://hydra.cc/docs/next/advanced/override_grammar/basic for details

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Expected Behavior

No error and bar's value should be set to "example@example.com".

System information

  • Hydra Version : 1.0.0
  • Python version : 3.7.4
  • Virtual environment type and version :
  • Operating system :

Additional context

Similar to #962

@omry
Copy link
Collaborator

omry commented Oct 19, 2020

This should be doable, but as a temporary solution you can quote the value for Hydra.
Since the shell will interpret your quotes, you need to quote for it as well.

$ python test.py '+bar="example@example.com"'

@omry omry added this to the 1.0.4 milestone Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants