question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

example/demo.py error when using -enable_login and -base_url options at the same time

See original GitHub issue

Bug Description example/demo.py error when using -enable_login and -base_url options at the same time #637

Reproduction Steps Enter steps to reproduce the behavior:

  1. I start visdom with:

$ python -m visdom.server -base_url /server4 -enable_login

Checking for scripts. Please input your username: tom Please input your password: It’s Alive! INFO:root:Application Started You can navigate to http://localhost:8097/server4 INFO:tornado.access:200 GET /server4 (127.0.0.1) 2.44ms INFO:tornado.access:200 GET /server4/static/js/sjcl.js?v=0a5863d9b8012111d58c1e43c346416d (127.0.0.1) 0.48ms INFO:tornado.access:200 GET /server4/static/css/login.css?v=a963a6ac60f2362f53f1a0a3023e5392 (127.0.0.1) 0.39ms INFO:tornado.access:200 GET /server4/static/css/bootstrap.min.css?v=ec3bb52a00e176a7181d454dffaea219 (127.0.0.1) 5.17ms INFO:tornado.access:200 GET /server4/static/js/jquery.min.js?v=e071abda8fe61194711cfc2ab99fe104 (127.0.0.1) 2.70ms INFO:tornado.access:200 POST /server4 (127.0.0.1) 0.57ms INFO:tornado.access:200 GET /server4 (127.0.0.1) 11.32ms INFO:tornado.access:200 GET /server4/static/js/bootstrap.min.js?v=5869c96cc8f19086aee625d670d741f9 (127.0.0.1) 0.74ms INFO:tornado.access:200 GET /server4/static/css/react-resizable-styles.css?v=9f91a8dbf4d8f7ef1399e625660405f4 (127.0.0.1) 0.62ms INFO:tornado.access:200 GET /server4/static/css/react-grid-layout-styles.css?v=7dc8934d2f9ac5303b8f0bb1148152a0 (127.0.0.1) 0.57ms INFO:tornado.access:200 GET /server4/static/js/react-react.min.js?v=bca103da5b5404d93783ccf73e0e9d1e (127.0.0.1) 0.60ms INFO:tornado.access:200 GET /server4/static/js/layout_bin_packer.js?v=6c46683ed70fbb1443caf3531243836d (127.0.0.1) 0.66ms INFO:tornado.access:200 GET /server4/static/js/react-dom.min.js?v=950495cc51ccb90612cf0fe0bb44f8f3 (127.0.0.1) 2.46ms INFO:tornado.access:200 GET /server4/static/css/style.css?v=79271c1aac4849e9025c34c3be4b7f45 (127.0.0.1) 0.66ms INFO:tornado.access:200 GET /server4/static/js/mathjax-MathJax.js?v=49565b9ce89c64da075a5a39969b366e (127.0.0.1) 0.59ms INFO:tornado.access:200 GET /server4/static/js/main.js?v=2b3e769917d2fefa803d1fa25fccb3d2 (127.0.0.1) 7.02ms INFO:tornado.access:200 GET /server4/static/js/plotly-plotly.min.js?v=ffdd16e6797de51f99b2f66f621e8b0d (127.0.0.1) 12.20ms INFO:tornado.access:200 GET /server4/static/fonts/glyphicons-halflings-regular.woff2 (127.0.0.1) 0.50ms INFO:tornado.access:101 GET /server4/socket (127.0.0.1) 0.34ms INFO:root:Opened new socket from ip: 127.0.0.1 INFO:tornado.access:200 POST /server4/env/main (127.0.0.1) 0.98ms INFO:tornado.access:200 POST /server4/env/main (127.0.0.1) 0.82ms

  1. In the browser, I can login succssfully at http://127.0.0.1:8097/server4. The blue window displays with the menu at the top.

  2. I’ve updated example/demo.py : parser.add_argument(‘-port’, metavar=‘port’, type=int, default=DEFAULT_PORT, help=‘port the visdom server is running on.’) parser.add_argument(‘-server’, metavar=‘server’, type=str, default=DEFAULT_HOSTNAME, help=‘Server address of the target to run the demo on.’) parser.add_argument(‘-base_url’, metavar=‘base_url’, type=str, default=‘/’, help=‘Base Url.’) parser.add_argument(‘-username’, metavar=‘username’, type=str, default=‘’, help=‘username.’) parser.add_argument(‘-password’, metavar=‘password’, type=str, default=‘’, help=‘password.’) parser.add_argument(‘-use_incoming_socket’, metavar=‘use_incoming_socket’, type=bool, default=True, help=‘use_incoming_socket.’)

    FLAGS = parser.parse_args() try: viz = Visdom(port=FLAGS.port, server=FLAGS.server, base_url=FLAGS.base_url, username=FLAGS.username, password=FLAGS.password,
    use_incoming_socket=FLAGS.use_incoming_socket) run_demo(viz)

  3. In a shell, I run python example/demo.py -port 8097 -server “127.0.0.1” -use_incoming_socket True -base_url “/server4” -username “tom” -password “tompassword”

And I get:

Setting up a new session… The visdom experienced an exception while running: RuntimeError(‘Authentication failed’) The demo displays up-to-date functionality with the GitHub version, which may not yet be pushed to pip. Please upgrade using pip install -e . or easy_install . If this does not resolve the problem, please open an issue on our GitHub.

  1. On the visdom server side, I get: WARNING:tornado.access:404 POST / (127.0.0.1) 0.34ms

Expected behavior All graphical objects are displayed.

Additional context With the -enable_login alone or base_url alone, demo.py works and displays all the graphics. However, with the base_url optioon alone, I have the 2 warnings for MathMenu.js and MathZoom.js.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kimchitsigaicommented, Jun 17, 2019

@JackUrb I had modified demo.py before running my tests. I guess you saw my post before I finished editing it. Thanks.

0reactions
JackUrbcommented, Jun 19, 2019

Fixed by you in #639. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Type error when using a baseURL and paths in a next project
I get this error when I go to build or type check with TSC on my NextJS 12 Project. node_modules/iron-session/next/index.ts:8:48 - error ......
Read more >
Typescript compiler throwing an error when adding baseurl ...
Im trying to enable absolute imports on my react project which just compiles with typescript. I have been told that I ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found