Skip to content

Commit

Permalink
Merge pull request #382 from ocefpaf/fix_failing_server
Browse files Browse the repository at this point in the history
Fix failing server
  • Loading branch information
ocefpaf authored Dec 5, 2024
2 parents 9df5965 + 1245356 commit 1f571fb
Show file tree
Hide file tree
Showing 5 changed files with 31,967 additions and 7 deletions.
7 changes: 3 additions & 4 deletions notebooks/00-quick_intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"\n",
"\n",
"First we need to instantiate the ERDDAP URL constructor for a server.\n",
"In these examples we will use\n",
"[https://standards.sensors.ioos.us/erddap/index.html](https://standards.sensors.ioos.us/erddap/index.html) and [https://erddap.ioos.us/erddap/index.html](https://erddap.ioos.us/erddap/index.html)."
"In these examples we will use [https://erddap.sensors.ioos.us/erddap/index.html](https://erddap.sensors.ioos.us/erddap/index.html)."
]
},
{
Expand All @@ -32,7 +31,7 @@
"source": [
"from erddapy import ERDDAP\n",
"\n",
"server = \"https://standards.sensors.ioos.us/erddap\"\n",
"server = \"https://erddap.sensors.ioos.us/erddap\"\n",
"e = ERDDAP(\n",
" server=server,\n",
" protocol=\"tabledap\",\n",
Expand Down Expand Up @@ -179,7 +178,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
"version": "3.13.0"
}
},
"nbformat": 4,
Expand Down
85 changes: 85 additions & 0 deletions tests/cassettes/test_fetch_no_results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,89 @@ interactions:
status:
code: 404
message: ''
- request:
body: ''
headers:
accept:
- '*/*'
accept-encoding:
- gzip, deflate, br, zstd
connection:
- keep-alive
host:
- standards.sensors.ioos.us
user-agent:
- python-httpx/0.27.2
method: GET
uri: https://standards.sensors.ioos.us/erddap/search/index.csv?page=1&itemsPerPage=1000000&searchFor="incredibly_long_string_that_should_never_match_a_real_dataset"%20
response:
body:
string: "<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502
Bad Gateway</h1></center>\r\n<hr><center>nginx/1.22.1</center>\r\n</body>\r\n</html>\r\n"
headers:
Connection:
- keep-alive
Content-Length:
- '157'
Content-Type:
- text/html
Date:
- Thu, 05 Dec 2024 10:12:07 GMT
Server:
- nginx/1.22.1
status:
code: 502
message: Bad Gateway
- request:
body: ''
headers:
accept:
- '*/*'
accept-encoding:
- gzip, deflate, br, zstd
connection:
- keep-alive
host:
- erddap.sensors.ioos.us
user-agent:
- python-httpx/0.27.2
method: GET
uri: https://erddap.sensors.ioos.us/erddap/search/index.csv?page=1&itemsPerPage=1000000&searchFor="incredibly_long_string_that_should_never_match_a_real_dataset"%20
response:
body:
string: "Error {\n code=404;\n message=\"Not Found: Resource not found:
Your query produced no matching results. Check the spelling of the word(s)
you searched for.\";\n}\n"
headers:
Connection:
- keep-alive
Content-Description:
- dods-error
Content-Encoding:
- identity
Content-Type:
- text/plain;charset=UTF-8
Date:
- Thu, 05 Dec 2024 10:13:09 GMT
Last-Modified:
- Thu, 05 Dec 2024 10:13:09 GMT
Server:
- nginx/1.22.1
Set-Cookie:
- cid=CgIHBWdRfLO7qVvUAycpAg==; expires=Sat, 05-Dec-26 10:13:09 GMT; path=/
Strict-Transport-Security:
- max-age=0
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- SAMEORIGIN
erddap-server:
- '2.25'
xdods-server:
- dods/3.7
status:
code: 404
message: ''
version: 1
Loading

0 comments on commit 1f571fb

Please sign in to comment.