prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  `publishing` example from the `embed` directory fails
  With an error message that is not particularly helpfull. Using bokeh 0.8.
  
  ```
  ➜  embed  python publishing.py
  Using saved session configuration for http://localhost:5006/
  To override, pass 'load_from_config=False' to Session
  INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost
  Traceback (most recent call last):
    File "publishing.py", line 11, in <module>
      Session().register('testuser', 'testpassword')
    File "/Users/nicolas/anaconda/lib/python2.7/site-packages/bokeh/session.py", line 208, in register
      raise RuntimeError("Unknown Error")
  RuntimeError: Unknown Error
  ```
  
  
  </issue>
  <code>
  [start of examples/embed/publishing.py]
  1 # The plot server must be running
  2 # Go to http://localhost:5006/bokeh to view this plot
  3 
  4 import time
  5 
  6 import numpy as np
  7 
  8 from bokeh.plotting import *
  9 from bokeh.session import Session
  10 from bokeh import embed
  11 Session().register('testuser', 'testpassword')
  12 N = 80
  13 x = np.linspace(0, 4*np.pi, N)
  14 y = np.sin(x)
  15 output_server("line_animate")
  16 TOOLS = "pan,wheel_zoom,box_zoom,reset,save,box_select"
  17 p = figure(tools=TOOLS)
  18 p.circle(x, y, color="#3333ee", name="sin")
  19 push()
  20 renderer = p.select(dict(name="sin"))
  21 ds = renderer[0].data_source
  22 cursession().publish()
  23 tag = embed.autoload_server(p, cursession(), public=True)
  24 html = """
  25 <html>
  26 <head></head>
  27 <body>
  28 %s
  29 </body>
  30 </html>
  31 """
  32 html = html % (tag)
  33 with open("publishing.html", "w+") as f:
  34     f.write(html)
  35 while True:
  36     for i in np.hstack((np.linspace(1, -1, 100), np.linspace(-1, 1, 100))):
  37         ds.data["y"] = y * i
  38         cursession().store_objects(ds)
  39         time.sleep(1.0)
  40
  [end of examples/embed/publishing.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/examples/embed/publishing.py b/examples/embed/publishing.py
  --- a/examples/embed/publishing.py
  +++ b/examples/embed/publishing.py
  @@ -1,4 +1,5 @@
   # The plot server must be running
  +# The server must run with --multi-user for this example to work
   # Go to http://localhost:5006/bokeh to view this plot
   
   import time
  
verification_info: {"golden_diff": "diff --git a/examples/embed/publishing.py b/examples/embed/publishing.py\n--- a/examples/embed/publishing.py\n+++ b/examples/embed/publishing.py\n@@ -1,4 +1,5 @@\n # The plot server must be running\n+# The server must run with --multi-user for this example to work\n # Go to http://localhost:5006/bokeh to view this plot\n \n import time\n", "issue": "`publishing` example from the `embed` directory fails\nWith an error message that is not particularly helpfull. Using bokeh 0.8.\n\n```\n\u279c  embed  python publishing.py\nUsing saved session configuration for http://localhost:5006/\nTo override, pass 'load_from_config=False' to Session\nINFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost\nTraceback (most recent call last):\n  File \"publishing.py\", line 11, in <module>\n    Session().register('testuser', 'testpassword')\n  File \"/Users/nicolas/anaconda/lib/python2.7/site-packages/bokeh/session.py\", line 208, in register\n    raise RuntimeError(\"Unknown Error\")\nRuntimeError: Unknown Error\n```\n\n", "before_files": [{"content": "# The plot server must be running\n# Go to http://localhost:5006/bokeh to view this plot\n\nimport time\n\nimport numpy as np\n\nfrom bokeh.plotting import *\nfrom bokeh.session import Session\nfrom bokeh import embed\nSession().register('testuser', 'testpassword')\nN = 80\nx = np.linspace(0, 4*np.pi, N)\ny = np.sin(x)\noutput_server(\"line_animate\")\nTOOLS = \"pan,wheel_zoom,box_zoom,reset,save,box_select\"\np = figure(tools=TOOLS)\np.circle(x, y, color=\"#3333ee\", name=\"sin\")\npush()\nrenderer = p.select(dict(name=\"sin\"))\nds = renderer[0].data_source\ncursession().publish()\ntag = embed.autoload_server(p, cursession(), public=True)\nhtml = \"\"\"\n<html>\n<head></head>\n<body>\n%s\n</body>\n</html>\n\"\"\"\nhtml = html % (tag)\nwith open(\"publishing.html\", \"w+\") as f:\n    f.write(html)\nwhile True:\n    for i in np.hstack((np.linspace(1, -1, 100), np.linspace(-1, 1, 100))):\n        ds.data[\"y\"] = y * i\n        cursession().store_objects(ds)\n        time.sleep(1.0)\n", "path": "examples/embed/publishing.py"}]}