prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Error downloading eBird_observation data.
  The URL doesn't work anymore.
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `try_install_all.py`
  Content:
  ```
  1 """Attempt to install all datasets into all database management systems
  2 
  3 This module, when run, attempts to install datasets from all Retriever scripts
  4 in the /scripts folder (except for those listed in IGNORE), for each engine in
  5 ENGINE_LIST() from __init__.py. In other words, it runs trys to install using
  6 all possible combinations of database platform and script and checks to
  7 see if there are any errors. It does not check the values in the database.
  8 
  9 """
  10 from __future__ import print_function
  11 from __future__ import absolute_import
  12 import os
  13 import sys
  14 from imp import reload
  15 from retriever.lib.tools import choose_engine
  16 from retriever import MODULE_LIST, ENGINE_LIST, SCRIPT_LIST
  17 
  18 reload(sys)
  19 if hasattr(sys, 'setdefaultencoding'):
  20     sys.setdefaultencoding('latin-1')
  21 
  22 MODULE_LIST = MODULE_LIST()
  23 ENGINE_LIST = ENGINE_LIST()
  24 if len(sys.argv) > 1:
  25     ENGINE_LIST = [
  26                     e for e in ENGINE_LIST
  27                     if e.name in sys.argv[1:] or
  28                     e.abbreviation in sys.argv[1:]
  29     ]
  30 SCRIPT_LIST = SCRIPT_LIST()
  31 TEST_ENGINES = {}
  32 IGNORE = ["AvianBodyMass", "FIA", "Bioclim", "PRISM", "vertnet","NPN", "mammsupertree", "eBirdOD"]
  33 IGNORE = [dataset.lower() for dataset in IGNORE]
  34 
  35 for engine in ENGINE_LIST:
  36     opts = {}
  37     print("** %s **" % engine.name)
  38     opts["engine"] = engine.abbreviation
  39 
  40     try:
  41         TEST_ENGINES[engine.abbreviation] = choose_engine(opts)
  42         TEST_ENGINES[engine.abbreviation].get_input()
  43         TEST_ENGINES[engine.abbreviation].get_cursor()
  44     except:
  45         TEST_ENGINES[engine.abbreviation] = None
  46         pass
  47 
  48 errors = []
  49 for module in MODULE_LIST:
  50     for (key, value) in list(TEST_ENGINES.items()):
  51         if module.SCRIPT.shortname.lower() not in IGNORE:
  52             if value != None:
  53                 print("==>", module.__name__, value.name, "..........", module.SCRIPT.shortname)
  54                 try:
  55                     module.SCRIPT.download(value)
  56                 except KeyboardInterrupt:
  57                     pass
  58                 except Exception as e:
  59                     print("ERROR.")
  60                     errors.append((key, module.__name__, e))
  61             else:
  62                 errors.append((key, "No connection detected......" + module.SCRIPT.shortname))
  63 
  64 print('')
  65 if errors:
  66     print("Engine, Dataset, Error")
  67     for error in errors:
  68         print(error)
  69 else:
  70     print("All tests passed")
  71
  ```
  
  Path: `scripts/eBird_observation.py`
  Content:
  ```
  1 #retriever
  2 """Data Retriever script for the eBird Observation Dataset"""
  3 
  4 from retriever.lib.templates import Script
  5 from retriever.lib.models import Table
  6 
  7 
  8 class main(Script):
  9     def __init__(self, **kwargs):
  10         Script.__init__(self, **kwargs)
  11         self.name = "eBird Observation Dataset"
  12         self.shortname = "eBirdOD"
  13         self.ref = "http://ebird.org/content/ebird/news/gbif/"
  14         self.urls = {"main": "https://dataone.ornith.cornell.edu/metacat/d1/mn/v1/object/CLOEODDATA.05192014.1"}
  15         self.retriever_minimum_version = '2.0.dev'
  16         self.version = '1.0'
  17         self.description = "A collection of observations from birders through portals managed and maintained by local partner conservation organizations"
  18 
  19     def download(self, engine=None, debug=False):
  20         data_file_name = "eBird_Observation_Dataset_2013.csv"
  21         Script.download(self, engine, debug)
  22         self.engine.download_files_from_archive(self.urls["main"],
  23                                                 [data_file_name],
  24                                                 filetype='gz')
  25         table = (Table("main", delimiter=","))
  26         table.columns=[("BASISOFRECORD",("char", )),
  27                        ("INSTITUTIONCODE",("char", )),
  28                        ("COLLECTIONCODE",("char", )),
  29                        ("CATALOGNUMBER",("char", )),
  30                        ("OCCURRENCEID",("char", )),
  31                        ("RECORDEDBY",("char", )),
  32                        ("YEAR",("int", )),
  33                        ("MONTH",("int", )),
  34                        ("DAY",("int", )),
  35                        ("COUNTRY",("char", )),
  36                        ("STATEPROVINCE",("char", )),
  37                        ("COUNTY",("char", )),
  38                        ("DECIMALLATITUDE",("double", )),
  39                        ("DECIMALLONGITUDE",("double", )),
  40                        ("LOCALITY",("char", )),
  41                        ("KINGDOM",("char", )),
  42                        ("PHYLUM",("char", )),
  43                        ("CLASS",("char", )),
  44                        ("SPORDER",("char", )),
  45                        ("FAMILY",("char", )),
  46                        ("GENUS",("char", )),
  47                        ("SPECIFICEPITHET",("char", )),
  48                        ("SCIENTIFICNAME",("char", )),
  49                        ("VERNACULARNAME",("char", )),
  50                        ("INDIVIDUALCOUNT",("int", ))]
  51         engine.table = table
  52         engine.create_table()
  53         engine.insert_data_from_file(engine.format_filename(data_file_name))
  54         return engine
  55 
  56 SCRIPT = main()
  57
  ```
  --- 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/scripts/eBird_observation.py b/scripts/eBird_observation.py
  deleted file mode 100644
  --- a/scripts/eBird_observation.py
  +++ /dev/null
  @@ -1,56 +0,0 @@
  -#retriever
  -"""Data Retriever script for the eBird Observation Dataset"""
  -
  -from retriever.lib.templates import Script
  -from retriever.lib.models import Table
  -
  -
  -class main(Script):
  -    def __init__(self, **kwargs):
  -        Script.__init__(self, **kwargs)
  -        self.name = "eBird Observation Dataset"
  -        self.shortname = "eBirdOD"
  -        self.ref = "http://ebird.org/content/ebird/news/gbif/"
  -        self.urls = {"main": "https://dataone.ornith.cornell.edu/metacat/d1/mn/v1/object/CLOEODDATA.05192014.1"}
  -        self.retriever_minimum_version = '2.0.dev'
  -        self.version = '1.0'
  -        self.description = "A collection of observations from birders through portals managed and maintained by local partner conservation organizations"
  -
  -    def download(self, engine=None, debug=False):
  -        data_file_name = "eBird_Observation_Dataset_2013.csv"
  -        Script.download(self, engine, debug)
  -        self.engine.download_files_from_archive(self.urls["main"],
  -                                                [data_file_name],
  -                                                filetype='gz')
  -        table = (Table("main", delimiter=","))
  -        table.columns=[("BASISOFRECORD",("char", )),
  -                       ("INSTITUTIONCODE",("char", )),
  -                       ("COLLECTIONCODE",("char", )),
  -                       ("CATALOGNUMBER",("char", )),
  -                       ("OCCURRENCEID",("char", )),
  -                       ("RECORDEDBY",("char", )),
  -                       ("YEAR",("int", )),
  -                       ("MONTH",("int", )),
  -                       ("DAY",("int", )),
  -                       ("COUNTRY",("char", )),
  -                       ("STATEPROVINCE",("char", )),
  -                       ("COUNTY",("char", )),
  -                       ("DECIMALLATITUDE",("double", )),
  -                       ("DECIMALLONGITUDE",("double", )),
  -                       ("LOCALITY",("char", )),
  -                       ("KINGDOM",("char", )),
  -                       ("PHYLUM",("char", )),
  -                       ("CLASS",("char", )),
  -                       ("SPORDER",("char", )),
  -                       ("FAMILY",("char", )),
  -                       ("GENUS",("char", )),
  -                       ("SPECIFICEPITHET",("char", )),
  -                       ("SCIENTIFICNAME",("char", )),
  -                       ("VERNACULARNAME",("char", )),
  -                       ("INDIVIDUALCOUNT",("int", ))]
  -        engine.table = table
  -        engine.create_table()
  -        engine.insert_data_from_file(engine.format_filename(data_file_name))
  -        return engine
  -
  -SCRIPT = main()
  diff --git a/try_install_all.py b/try_install_all.py
  --- a/try_install_all.py
  +++ b/try_install_all.py
  @@ -29,7 +29,7 @@
       ]
   SCRIPT_LIST = SCRIPT_LIST()
   TEST_ENGINES = {}
  -IGNORE = ["AvianBodyMass", "FIA", "Bioclim", "PRISM", "vertnet","NPN", "mammsupertree", "eBirdOD"]
  +IGNORE = ["AvianBodyMass", "FIA", "Bioclim", "PRISM", "vertnet","NPN", "mammsupertree"]
   IGNORE = [dataset.lower() for dataset in IGNORE]
   
   for engine in ENGINE_LIST:
  
verification_info: {"golden_diff": "diff --git a/scripts/eBird_observation.py b/scripts/eBird_observation.py\ndeleted file mode 100644\n--- a/scripts/eBird_observation.py\n+++ /dev/null\n@@ -1,56 +0,0 @@\n-#retriever\n-\"\"\"Data Retriever script for the eBird Observation Dataset\"\"\"\n-\n-from retriever.lib.templates import Script\n-from retriever.lib.models import Table\n-\n-\n-class main(Script):\n-    def __init__(self, **kwargs):\n-        Script.__init__(self, **kwargs)\n-        self.name = \"eBird Observation Dataset\"\n-        self.shortname = \"eBirdOD\"\n-        self.ref = \"http://ebird.org/content/ebird/news/gbif/\"\n-        self.urls = {\"main\": \"https://dataone.ornith.cornell.edu/metacat/d1/mn/v1/object/CLOEODDATA.05192014.1\"}\n-        self.retriever_minimum_version = '2.0.dev'\n-        self.version = '1.0'\n-        self.description = \"A collection of observations from birders through portals managed and maintained by local partner conservation organizations\"\n-\n-    def download(self, engine=None, debug=False):\n-        data_file_name = \"eBird_Observation_Dataset_2013.csv\"\n-        Script.download(self, engine, debug)\n-        self.engine.download_files_from_archive(self.urls[\"main\"],\n-                                                [data_file_name],\n-                                                filetype='gz')\n-        table = (Table(\"main\", delimiter=\",\"))\n-        table.columns=[(\"BASISOFRECORD\",(\"char\", )),\n-                       (\"INSTITUTIONCODE\",(\"char\", )),\n-                       (\"COLLECTIONCODE\",(\"char\", )),\n-                       (\"CATALOGNUMBER\",(\"char\", )),\n-                       (\"OCCURRENCEID\",(\"char\", )),\n-                       (\"RECORDEDBY\",(\"char\", )),\n-                       (\"YEAR\",(\"int\", )),\n-                       (\"MONTH\",(\"int\", )),\n-                       (\"DAY\",(\"int\", )),\n-                       (\"COUNTRY\",(\"char\", )),\n-                       (\"STATEPROVINCE\",(\"char\", )),\n-                       (\"COUNTY\",(\"char\", )),\n-                       (\"DECIMALLATITUDE\",(\"double\", )),\n-                       (\"DECIMALLONGITUDE\",(\"double\", )),\n-                       (\"LOCALITY\",(\"char\", )),\n-                       (\"KINGDOM\",(\"char\", )),\n-                       (\"PHYLUM\",(\"char\", )),\n-                       (\"CLASS\",(\"char\", )),\n-                       (\"SPORDER\",(\"char\", )),\n-                       (\"FAMILY\",(\"char\", )),\n-                       (\"GENUS\",(\"char\", )),\n-                       (\"SPECIFICEPITHET\",(\"char\", )),\n-                       (\"SCIENTIFICNAME\",(\"char\", )),\n-                       (\"VERNACULARNAME\",(\"char\", )),\n-                       (\"INDIVIDUALCOUNT\",(\"int\", ))]\n-        engine.table = table\n-        engine.create_table()\n-        engine.insert_data_from_file(engine.format_filename(data_file_name))\n-        return engine\n-\n-SCRIPT = main()\ndiff --git a/try_install_all.py b/try_install_all.py\n--- a/try_install_all.py\n+++ b/try_install_all.py\n@@ -29,7 +29,7 @@\n     ]\n SCRIPT_LIST = SCRIPT_LIST()\n TEST_ENGINES = {}\n-IGNORE = [\"AvianBodyMass\", \"FIA\", \"Bioclim\", \"PRISM\", \"vertnet\",\"NPN\", \"mammsupertree\", \"eBirdOD\"]\n+IGNORE = [\"AvianBodyMass\", \"FIA\", \"Bioclim\", \"PRISM\", \"vertnet\",\"NPN\", \"mammsupertree\"]\n IGNORE = [dataset.lower() for dataset in IGNORE]\n \n for engine in ENGINE_LIST:\n", "issue": "Error downloading eBird_observation data.\nThe URL doesn't work anymore.\n\n", "before_files": [{"content": "\"\"\"Attempt to install all datasets into all database management systems\n\nThis module, when run, attempts to install datasets from all Retriever scripts\nin the /scripts folder (except for those listed in IGNORE), for each engine in\nENGINE_LIST() from __init__.py. In other words, it runs trys to install using\nall possible combinations of database platform and script and checks to\nsee if there are any errors. It does not check the values in the database.\n\n\"\"\"\nfrom __future__ import print_function\nfrom __future__ import absolute_import\nimport os\nimport sys\nfrom imp import reload\nfrom retriever.lib.tools import choose_engine\nfrom retriever import MODULE_LIST, ENGINE_LIST, SCRIPT_LIST\n\nreload(sys)\nif hasattr(sys, 'setdefaultencoding'):\n    sys.setdefaultencoding('latin-1')\n\nMODULE_LIST = MODULE_LIST()\nENGINE_LIST = ENGINE_LIST()\nif len(sys.argv) > 1:\n    ENGINE_LIST = [\n                    e for e in ENGINE_LIST\n                    if e.name in sys.argv[1:] or\n                    e.abbreviation in sys.argv[1:]\n    ]\nSCRIPT_LIST = SCRIPT_LIST()\nTEST_ENGINES = {}\nIGNORE = [\"AvianBodyMass\", \"FIA\", \"Bioclim\", \"PRISM\", \"vertnet\",\"NPN\", \"mammsupertree\", \"eBirdOD\"]\nIGNORE = [dataset.lower() for dataset in IGNORE]\n\nfor engine in ENGINE_LIST:\n    opts = {}\n    print(\"** %s **\" % engine.name)\n    opts[\"engine\"] = engine.abbreviation\n\n    try:\n        TEST_ENGINES[engine.abbreviation] = choose_engine(opts)\n        TEST_ENGINES[engine.abbreviation].get_input()\n        TEST_ENGINES[engine.abbreviation].get_cursor()\n    except:\n        TEST_ENGINES[engine.abbreviation] = None\n        pass\n\nerrors = []\nfor module in MODULE_LIST:\n    for (key, value) in list(TEST_ENGINES.items()):\n        if module.SCRIPT.shortname.lower() not in IGNORE:\n            if value != None:\n                print(\"==>\", module.__name__, value.name, \"..........\", module.SCRIPT.shortname)\n                try:\n                    module.SCRIPT.download(value)\n                except KeyboardInterrupt:\n                    pass\n                except Exception as e:\n                    print(\"ERROR.\")\n                    errors.append((key, module.__name__, e))\n            else:\n                errors.append((key, \"No connection detected......\" + module.SCRIPT.shortname))\n\nprint('')\nif errors:\n    print(\"Engine, Dataset, Error\")\n    for error in errors:\n        print(error)\nelse:\n    print(\"All tests passed\")\n", "path": "try_install_all.py"}, {"content": "#retriever\n\"\"\"Data Retriever script for the eBird Observation Dataset\"\"\"\n\nfrom retriever.lib.templates import Script\nfrom retriever.lib.models import Table\n\n\nclass main(Script):\n    def __init__(self, **kwargs):\n        Script.__init__(self, **kwargs)\n        self.name = \"eBird Observation Dataset\"\n        self.shortname = \"eBirdOD\"\n        self.ref = \"http://ebird.org/content/ebird/news/gbif/\"\n        self.urls = {\"main\": \"https://dataone.ornith.cornell.edu/metacat/d1/mn/v1/object/CLOEODDATA.05192014.1\"}\n        self.retriever_minimum_version = '2.0.dev'\n        self.version = '1.0'\n        self.description = \"A collection of observations from birders through portals managed and maintained by local partner conservation organizations\"\n\n    def download(self, engine=None, debug=False):\n        data_file_name = \"eBird_Observation_Dataset_2013.csv\"\n        Script.download(self, engine, debug)\n        self.engine.download_files_from_archive(self.urls[\"main\"],\n                                                [data_file_name],\n                                                filetype='gz')\n        table = (Table(\"main\", delimiter=\",\"))\n        table.columns=[(\"BASISOFRECORD\",(\"char\", )),\n                       (\"INSTITUTIONCODE\",(\"char\", )),\n                       (\"COLLECTIONCODE\",(\"char\", )),\n                       (\"CATALOGNUMBER\",(\"char\", )),\n                       (\"OCCURRENCEID\",(\"char\", )),\n                       (\"RECORDEDBY\",(\"char\", )),\n                       (\"YEAR\",(\"int\", )),\n                       (\"MONTH\",(\"int\", )),\n                       (\"DAY\",(\"int\", )),\n                       (\"COUNTRY\",(\"char\", )),\n                       (\"STATEPROVINCE\",(\"char\", )),\n                       (\"COUNTY\",(\"char\", )),\n                       (\"DECIMALLATITUDE\",(\"double\", )),\n                       (\"DECIMALLONGITUDE\",(\"double\", )),\n                       (\"LOCALITY\",(\"char\", )),\n                       (\"KINGDOM\",(\"char\", )),\n                       (\"PHYLUM\",(\"char\", )),\n                       (\"CLASS\",(\"char\", )),\n                       (\"SPORDER\",(\"char\", )),\n                       (\"FAMILY\",(\"char\", )),\n                       (\"GENUS\",(\"char\", )),\n                       (\"SPECIFICEPITHET\",(\"char\", )),\n                       (\"SCIENTIFICNAME\",(\"char\", )),\n                       (\"VERNACULARNAME\",(\"char\", )),\n                       (\"INDIVIDUALCOUNT\",(\"int\", ))]\n        engine.table = table\n        engine.create_table()\n        engine.insert_data_from_file(engine.format_filename(data_file_name))\n        return engine\n\nSCRIPT = main()\n", "path": "scripts/eBird_observation.py"}], "after_files": [{"content": "\"\"\"Attempt to install all datasets into all database management systems\n\nThis module, when run, attempts to install datasets from all Retriever scripts\nin the /scripts folder (except for those listed in IGNORE), for each engine in\nENGINE_LIST() from __init__.py. In other words, it runs trys to install using\nall possible combinations of database platform and script and checks to\nsee if there are any errors. It does not check the values in the database.\n\n\"\"\"\nfrom __future__ import print_function\nfrom __future__ import absolute_import\nimport os\nimport sys\nfrom imp import reload\nfrom retriever.lib.tools import choose_engine\nfrom retriever import MODULE_LIST, ENGINE_LIST, SCRIPT_LIST\n\nreload(sys)\nif hasattr(sys, 'setdefaultencoding'):\n    sys.setdefaultencoding('latin-1')\n\nMODULE_LIST = MODULE_LIST()\nENGINE_LIST = ENGINE_LIST()\nif len(sys.argv) > 1:\n    ENGINE_LIST = [\n                    e for e in ENGINE_LIST\n                    if e.name in sys.argv[1:] or\n                    e.abbreviation in sys.argv[1:]\n    ]\nSCRIPT_LIST = SCRIPT_LIST()\nTEST_ENGINES = {}\nIGNORE = [\"AvianBodyMass\", \"FIA\", \"Bioclim\", \"PRISM\", \"vertnet\",\"NPN\", \"mammsupertree\"]\nIGNORE = [dataset.lower() for dataset in IGNORE]\n\nfor engine in ENGINE_LIST:\n    opts = {}\n    print(\"** %s **\" % engine.name)\n    opts[\"engine\"] = engine.abbreviation\n\n    try:\n        TEST_ENGINES[engine.abbreviation] = choose_engine(opts)\n        TEST_ENGINES[engine.abbreviation].get_input()\n        TEST_ENGINES[engine.abbreviation].get_cursor()\n    except:\n        TEST_ENGINES[engine.abbreviation] = None\n        pass\n\nerrors = []\nfor module in MODULE_LIST:\n    for (key, value) in list(TEST_ENGINES.items()):\n        if module.SCRIPT.shortname.lower() not in IGNORE:\n            if value != None:\n                print(\"==>\", module.__name__, value.name, \"..........\", module.SCRIPT.shortname)\n                try:\n                    module.SCRIPT.download(value)\n                except KeyboardInterrupt:\n                    pass\n                except Exception as e:\n                    print(\"ERROR.\")\n                    errors.append((key, module.__name__, e))\n            else:\n                errors.append((key, \"No connection detected......\" + module.SCRIPT.shortname))\n\nprint('')\nif errors:\n    print(\"Engine, Dataset, Error\")\n    for error in errors:\n        print(error)\nelse:\n    print(\"All tests passed\")\n", "path": "try_install_all.py"}, {"content": null, "path": "scripts/eBird_observation.py"}]}