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

Trying to access flag --mode before flags were parsed. #6

Open
FantDing opened this issue Jan 12, 2018 · 3 comments
Open

Trying to access flag --mode before flags were parsed. #6

FantDing opened this issue Jan 12, 2018 · 3 comments

Comments

@FantDing
Copy link

Hi !I am learnig tensorflow and textboxes, when I run the command "python3 main.py --mode train
", it outputs

Traceback (most recent call last): File "main.py", line 24, in <module> if FLAGS.mode == "train": File "/usr/local/lib/python3.5/dist-packages/absl/flags/_flagvalues.py", line 488, in __getattr__ raise _exceptions.UnparsedFlagAccessError(error_message) absl.flags._exceptions.UnparsedFlagAccessError: Trying to access flag --mode before flags were parsed.
How can I run the main.py? Thanks!

@dev-strender
Copy link

you should put a comand like

python3 main.py --mode=train

@DavidSeas
Copy link

The equal is not necessary in flag so for example use:
python main.py --mode test --iter 10

@rainmaker712
Copy link

Same issues

google/python-gflags#37

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

4 participants