prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Spider northern_california_breweries is broken
  During the global build at 2021-06-23-14-42-18, spider **northern_california_breweries** failed with **0 features** and **1 errors**.
  
  Here's [the log](https://data.alltheplaces.xyz/runs/2021-06-23-14-42-18/logs/northern_california_breweries.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-06-23-14-42-18/output/northern_california_breweries.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-06-23-14-42-18/output/northern_california_breweries.geojson))
  
  </issue>
  <code>
  [start of locations/spiders/northern_california_breweries.py]
  1 # -*- coding: utf-8 -*-
  2 import scrapy
  3 from locations.items import GeojsonPointItem
  4 import json
  5 import re
  6 
  7 class NorthernCaliforniaBreweriesSpider(scrapy.Spider):
  8     name = "northern_california_breweries"
  9     allowed_domains = ["projects.sfchronicle.com"]
  10     start_urls = (
  11         'http://projects.sfchronicle.com/2017/brewery-map/',
  12     )
  13 
  14     def parse(self, response):
  15       beerData = response.xpath("//*[text()[contains(.,'beerData')]]").extract_first()
  16       matches = re.search(r"var beerData = (\[(.*)\])", beerData)
  17       jsonData = matches.group(0).replace("var beerData = ","")
  18       breweryList = json.loads(jsonData)
  19 
  20       for item in breweryList:
  21         yield GeojsonPointItem(
  22           ref=item.get('Brewery'),
  23           lat=float(item.get('Latitude')),
  24           lon=float(item.get('Longitude')),
  25           addr_full=item.get('Address'),
  26           city=item.get('City'),
  27           state="CA",
  28           website=item.get('Website'),
  29         )
  30
  [end of locations/spiders/northern_california_breweries.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/locations/spiders/northern_california_breweries.py b/locations/spiders/northern_california_breweries.py
  --- a/locations/spiders/northern_california_breweries.py
  +++ b/locations/spiders/northern_california_breweries.py
  @@ -18,10 +18,19 @@
         breweryList = json.loads(jsonData)
   
         for item in breweryList:
  +        latitude = None
  +        longitude = None
  +
  +        if item.get('Latitude') is not None:
  +          latitude = float(item.get('Latitude'))
  +
  +        if item.get('Longitude') is not None:
  +          longitude = float(item.get('Longitude'))
  +        
           yield GeojsonPointItem(
             ref=item.get('Brewery'),
  -          lat=float(item.get('Latitude')),
  -          lon=float(item.get('Longitude')),
  +          lat=latitude,
  +          lon=longitude,
             addr_full=item.get('Address'),
             city=item.get('City'),
             state="CA",
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/northern_california_breweries.py b/locations/spiders/northern_california_breweries.py\n--- a/locations/spiders/northern_california_breweries.py\n+++ b/locations/spiders/northern_california_breweries.py\n@@ -18,10 +18,19 @@\n       breweryList = json.loads(jsonData)\n \n       for item in breweryList:\n+        latitude = None\n+        longitude = None\n+\n+        if item.get('Latitude') is not None:\n+          latitude = float(item.get('Latitude'))\n+\n+        if item.get('Longitude') is not None:\n+          longitude = float(item.get('Longitude'))\n+        \n         yield GeojsonPointItem(\n           ref=item.get('Brewery'),\n-          lat=float(item.get('Latitude')),\n-          lon=float(item.get('Longitude')),\n+          lat=latitude,\n+          lon=longitude,\n           addr_full=item.get('Address'),\n           city=item.get('City'),\n           state=\"CA\",\n", "issue": "Spider northern_california_breweries is broken\nDuring the global build at 2021-06-23-14-42-18, spider **northern_california_breweries** failed with **0 features** and **1 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-06-23-14-42-18/logs/northern_california_breweries.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-06-23-14-42-18/output/northern_california_breweries.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-06-23-14-42-18/output/northern_california_breweries.geojson))\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\nfrom locations.items import GeojsonPointItem\nimport json\nimport re\n\nclass NorthernCaliforniaBreweriesSpider(scrapy.Spider):\n    name = \"northern_california_breweries\"\n    allowed_domains = [\"projects.sfchronicle.com\"]\n    start_urls = (\n        'http://projects.sfchronicle.com/2017/brewery-map/',\n    )\n\n    def parse(self, response):\n      beerData = response.xpath(\"//*[text()[contains(.,'beerData')]]\").extract_first()\n      matches = re.search(r\"var beerData = (\\[(.*)\\])\", beerData)\n      jsonData = matches.group(0).replace(\"var beerData = \",\"\")\n      breweryList = json.loads(jsonData)\n\n      for item in breweryList:\n        yield GeojsonPointItem(\n          ref=item.get('Brewery'),\n          lat=float(item.get('Latitude')),\n          lon=float(item.get('Longitude')),\n          addr_full=item.get('Address'),\n          city=item.get('City'),\n          state=\"CA\",\n          website=item.get('Website'),\n        )\n", "path": "locations/spiders/northern_california_breweries.py"}]}