Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract Web Source - shef assumptions too rigid to open URL #877

Open
jbatterman opened this issue Jan 10, 2025 · 0 comments
Open

Abstract Web Source - shef assumptions too rigid to open URL #877

jbatterman opened this issue Jan 10, 2025 · 0 comments
Labels
bug priority-medium Baseline priority.

Comments

@jbatterman
Copy link
Collaborator

Describe the bug
Attempting to open a URL through OpenDCS abstractweb source formatted as shefit does not work but does work for shef.e formatted pages. OpenDCS will open the URL if shefmode=False or if shefmode=True. If header=shef in the source, it will attempt to read the URL and error out because of the formatting. If header=other in the source, it will not open the URL.

To Reproduce
Steps to reproduce the behavior:

  1. Add new abstractweb source with URL = https://www.ameren.com/api/ameren/Hydroelectric/getDailyShefitGMTReport?interval=1h

  2. Set shefmode = True or False

  3. Set header = shef

  4. Run rs on source and see log.

  5. Error as follows:
    INFO 12/18/24 19:06:40 WebDataSource Opening 'https://www.ameren.com/api/ameren/Hydroelectric/getDailyShefitGMTReport?interval=1h'
    DBG3 12/18/24 19:06:42 scanForMessage oneMessageFile=true, mediumId=null
    DBG3 12/18/24 19:06:42 SHEF Station name='BAGLAMUE20241217060000'
    DBG3 12/18/24 19:06:42 SHEF Station Time='0'
    WARNING 12/18/24 19:06:42 Invalid time-zone '0' in SHEF message ignored, using UTC.
    DBG3 12/18/24 19:06:42 SHEF Time Zone = UTC
    DBG3 12/18/24 19:06:42 SHEF Header Length set to 29
    FAILURE 12/18/24 19:06:42 StreamDataSource Failed to parse header: decodes.datasource.HeaderParseException: Invalid date field in SHEF message '0' -- message file is invalid.
    DBG3 12/18/24 19:06:42 scanForMessage oneMessageFile=true, mediumId=null
    WARNING 12/18/24 19:06:42 RoutingSpec(Ameren-WebService) WebAbstractDataSource cannot open 'https://www.ameren.com/api/ameren/Hydroelectric/getDailyShefitGMTReport?interval=1h': decodes.datasource.D
    ataSourceEndException: Stream EOF.

  6. Go back to source and set header = other.

  7. Run rs on source and see error.
    WebAbstractDataSource cannot open 'https://www.ameren.com/api/ameren/Hydroelectric/getDailyShefitGMTReport?interval=1h': java.lang.NullPointerException
    java.lang.NullPointerException
    at decodes.db.TransportMedium.makeTmKey(TransportMedium.java:332)
    at decodes.db.PlatformList.findPlatform(PlatformList.java:228)
    at decodes.db.PlatformList.getPlatform(PlatformList.java:154)
    at decodes.datasource.StreamDataSource.makePlatformAssociation(StreamDataSource.java:637)
    at decodes.datasource.StreamDataSource.getRawMessage(StreamDataSource.java:552)
    at decodes.datasource.WebAbstractDataSource.getRawMessage(WebAbstractDataSource.java:209)
    at decodes.routing.RoutingSpecThread.run(RoutingSpecThread.java:435)

Expected behavior
Expect to be able to open and parse the URL as plain text or have more flexible shef assumptions so the URL can be opened.

Desktop/ServerSide (please complete the following information):

  • OS: Windows client v7.0.1
  • Server: v6.8
@jbatterman jbatterman added bug priority-medium Baseline priority. labels Jan 10, 2025
@jbatterman jbatterman changed the title Abstract Web Source - shefmode assumptions too rigid to open URL Abstract Web Source - shef assumptions too rigid to open URL Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug priority-medium Baseline priority.
Projects
None yet
Development

No branches or pull requests

1 participant