prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN 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))
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `locations/spiders/northern_california_breweries.py`
  Content:
  ```
  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 FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
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"}], "after_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        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=latitude,\n          lon=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"}]}