NetLogo / NetLogo/GIS-Extension
`import-wms-drawing` fails in GIS General Examples model with Internal Server Error (HTTP code 500)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 36
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
In the GIS General Examples model the download-background-image fails when calling gis:import-wms-drawing with the following error message:
Extension exception: Unable to fetch wms image:
http result code 500 (Internal Server Error) (URL: https://ows.terrestris.de/osm/service?Format=image/jpeg&Transparent=TRUE&Version=1.1.1&SRS=EPSG:4326&BBOX=-180,-90,62069,180,90,62069&Request=GetMap&Service=wms&Height=292&Layers=OSM-WMS&Width=580&Styles=)
error while observer running GIS:IMPORT-WMS-DRAWING
called by procedure DOWNLOAD-BACKGROUND-IMAGE
called by Button 'download-background-image'
In this example this code is executed:
to download-background-image
if-else projection = "WGS_84_Geographic" [
gis:import-wms-drawing "https://ows.terrestris.de/osm/service?" "EPSG:4326" "OSM-WMS" 0
] [
show "Only WGS_84_Geographic projections are supported. Please Change to WGS_84_Geographic in the top left drop-down."
]
end
And here is the full error message with internal details:
Full error message
Extension exception: Unable to fetch wms image:
http result code 500 (Internal Server Error) (URL: https://ows.terrestris.de/osm/service?Format=image/jpeg&Transparent=TRUE&Version=1.1.1&SRS=EPSG:4326&BBOX=-180,-90,62069,180,90,62069&Request=GetMap&Service=wms&Height=292&Layers=OSM-WMS&Width=580&Styles=)
error while observer running GIS:IMPORT-WMS-DRAWING
called by procedure DOWNLOAD-BACKGROUND-IMAGE
called by Button 'download-background-image'
org.nlogo.nvm.WrappedExtensionException: Extension exception: Unable to fetch wms image:
http result code 500 (Internal Server Error) (URL: https://ows.terrestris.de/osm/service?Format=image/jpeg&Transparent=TRUE&Version=1.1.1&SRS=EPSG:4326&BBOX=-180,-90,62069,180,90,62069&Request=GetMap&Service=wms&Height=292&Layers=OSM-WMS&Width=580&Styles=)
at org.nlogo.prim._extern.perform(_extern.java:40)
at org.nlogo.nvm.Context.stepConcurrent(Context.java:107)
at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.scala:65)
at org.nlogo.job.JobThread.runPrimaryJobs(JobThread.scala:133)
at org.nlogo.job.JobThread.$anonfun$run$1(JobThread.scala:68)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.util.control.Exception$Catch.apply(Exception.scala:228)
at org.nlogo.api.Exceptions$.handling(Exceptions.scala:41)
at org.nlogo.job.JobThread.run(JobThread.scala:66)
Caused by: org.nlogo.api.ExtensionException: Unable to fetch wms image:
http result code 500 (Internal Server Error) (URL: https://ows.terrestris.de/osm/service?Format=image/jpeg&Transparent=TRUE&Version=1.1.1&SRS=EPSG:4326&BBOX=-180,-90,62069,180,90,62069&Request=GetMap&Service=wms&Height=292&Layers=OSM-WMS&Width=580&Styles=)
at org.myworldgis.netlogo.LoadWMSImage.performInternal(LoadWMSImage.java:76)
at org.myworldgis.netlogo.GISExtension$Command.perform(GISExtension.java:61)
at org.nlogo.prim._extern.perform(_extern.java:36)
... 8 more
NetLogo 6.3.0
main: org.nlogo.app.AppFrame
thread: JobThread
OpenJDK 64-Bit Server VM 17.0.3 (BellSoft; 17.0.3+7-LTS)
operating system: Windows 11 10.0 (amd64 processor)
Scala version 2.12.16
JOGL: (3D View not initialized)
OpenGL Graphics: (3D View not initialized)
model: GIS General Examples
02:38:59.465 SwitchedTabsEvent (org.nlogo.app.Tabs) AWT-EventQueue-0
02:38:59.461 RuntimeErrorEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
02:38:59.461 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0
02:38:59.461 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
02:38:59.461 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
02:38:59.461 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
02:38:59.461 PeriodicUpdateEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
02:38:59.380 AddJobEvent (org.nlogo.window.ButtonWidget) AWT-EventQueue-0
02:38:59.304 InputBoxLoseFocusEvent (org.nlogo.window.ButtonWidget) AWT-EventQueue-0
02:38:59.248 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0
It could have to do with an API change in the ows.terrestris.de service, but I'm not sure.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with LoadWMSImage.java at line 76 and the GIS General Examples model's download-background-image procedure. Reproduce the failing gis:import-wms-drawing request and inspect how GISExtension.java constructs and handles the WMS response. Done means the example can download its background image successfully, with coverage for the corrected request or response handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100