Skip to content

Conversation

samholt
Copy link

@samholt samholt commented Mar 14, 2018

Fixed flag naming convention, that causes python to throw an error when running. See below from a hyphen - to underscore _.

@zxytim
Copy link
Collaborator

zxytim commented Mar 14, 2018

Why did you change ‘-’ to '_'?

@schwarzichet
Copy link

schwarzichet commented Jul 18, 2018

#66

@zxytim because when '-' is used, the demo program will fail as

  File "/home/xxxxx/anaconda2/envs/EAST/lib/python3.5/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/xxxxx/anaconda2/envs/EAST/lib/python3.5/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/xxxxx/EAST/run_demo_server.py", line 204, in index_post
    rst = get_predictor(checkpoint_path)(img)
  File "/home/xxxxx/EAST/run_demo_server.py", line 47, in get_predictor
    f_score, f_geometry = model.model(input_images, is_training=False)
  File "/home/xxxxx/EAST/model.py", line 78, in model
    geo_map = slim.conv2d(g[3], 4, 1, activation_fn=tf.nn.sigmoid, normalizer_fn=None) * FLAGS.text_scale
  File "/home/xxxxx/.local/lib/python3.5/site-packages/tensorflow/python/platform/flags.py", line 84, in __getattr__
    wrapped(_sys.argv)
  File "/home/xxxxx/.local/lib/python3.5/site-packages/absl/flags/_flagvalues.py", line 630, in __call__
    name, value, suggestions=suggestions)
absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'checkpoint-path'. Did you mean: checkpoint_path ?

(when the dubug mode of flask is on it will show such traceback message)

it seems in somewhere the program needs "checkpoint_path" not "checkpoint-path". And after I replace "checkpoint-path" in run_demo_server.py as "checkpoint_path", the error is gone and program works.

so not only the readme needs modification, "run_demo_server.py" needs it too.

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

Successfully merging this pull request may close these issues.

4 participants