Announcement

Collapse
No announcement yet.

Jon00 Datascaper compiler error on rPi/Linux

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Jon00 Datascaper compiler error on rPi/Linux

    Hi,
    I have struggled a bit getting the Jon00 Datascraper script to run. It just returns a long error message in the log that doesn't really tell me much.
    I suspected an outdatet Linux/Mono installation, so I got it all updatet to latest and greatest everything. No success, exactly same error message.

    It does not create the text file or any devices, just immediately throws the error below.

    Any clues? Thanks!

    1/29/2023 13:14:44
    HomeSeer
    Error
    Compiling script (1)Jon00DataScraper.vben: Visual Basic.Net Compiler version 0.0.0.5943 (Mono 4.7 - tarball) Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved. /tmp/y0qbutrc.0.vb (301,98): Compiler error around this location, the compiler hasn't implemented the error message, nor error recovery, so the compiler will probably crash soon. at vbnc.Helper.ErrorRecoveryNotImplemented (vbnc.Span Location) [0x00000] in :0 at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, System.Boolean IsOneLiner) [0x00000] in :0 at vbnc.Parser.ParseTryStatement (vbnc.ParsedObject Parent, System.Boolean IsOneLiner) [0x00000] in :0 at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, System.Boolean IsOneLiner) [0x00000] in :0 at vbnc.Parser.ParseIfStatement (vbnc.ParsedObject Parent, System.Boolean IsOneLiner) [0x00000] in :0 at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, System.Boolean IsOneLiner) [0x00000] in :0 at vbnc.Parser.ParseTryStatement (vbnc.ParsedObject Parent, System.Boolean IsOneLiner) [0x00000] in :0 at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, System.Boolean IsOneLiner) [0x00000] in :0 at vbnc.Parser.ParseSubDeclaration (vbnc.TypeDeclaration Parent, vbnc.ParseAttributableInfo Info) [0x00000] in :0 at vbnc.Parser.ParseTypeMembers (vbnc.TypeDeclaration Parent) [0x00000] in :0 at vbnc.Parser.ParseClassDeclaration (vbnc.ParsedObject Parent, vbnc.Attributes Attributes, System.String Namespace) [0x00000] in :0 at vbnc.Parser.ParseTypeDeclaration (vbnc.ParsedObject Parent, vbnc.Attributes Attributes, System.String Namespace) [0x00000] in :0 at vbnc.Parser.ParseAssemblyMembers (vbnc.AssemblyDeclaration Parent, System.String RootNamespace) [0x00000] in :0 at vbnc.Parser.ParseAssemblyDeclaration (System.String RootNamespace, vbnc.AssemblyDeclaration assembly) [0x00000] in :0 at vbnc.Parser.Parse (System.String RootNamespace, vbnc.AssemblyDeclaration assembly) [0x00000] in :0 at vbnc.Compiler.Compile_Parse () [0x00000] in :0 at vbnc.Compiler.Compile () [0x00000] in :0 at vbnc.Compiler.Compile (System.String[] CommandLine) [0x00000] in :0 at vbnc.Main.Main (System.String[] CmdArgs) [0x00000] in :0 /tmp/y0qbutrc.0.vb (301,98) : error VBNC99999: vbnc crashed nearby this location in the source code. vbnc : Command line : error VBNC99999: Unexpected error: Object reference not set to an instance of an object. at vbnc.AssignmentStatement.Init (vbnc.Expression LSide, vbnc.Expression RSide) [0x0001e] in :0 at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, System.Boolean IsOneLiner) [0x002ed] in :0 at vbnc.Parser.ParseTryStatement (vbnc.ParsedObject Parent, System.Boolean IsOneLiner) [0x0004e] in :0 at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, System.Boolean IsOneLiner) [0x00a4a] in :0 at vbnc.Parser.ParseIfStatement (vbnc.ParsedObject Parent, System.Boolean IsOneLiner) [0x000ee] in :0 at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, System.Boolean IsOneLiner) [0x00bc3] in :0 at vbnc.Parser.ParseTryStatement (vbnc.ParsedObject Parent, System.Boolean IsOneLiner) [0x0004e] in :0 at vbnc.Parser.ParseCodeBlock (vbnc.ParsedObject Parent, System.Boolean IsOneLiner) [0x00a4a] in :0 at vbnc.Parser.ParseSubDeclaration (vbnc.TypeDeclaration Parent, vbnc.ParseAttributableInfo Info) [0x000e8] in :0 at vbnc.Parser.ParseTypeMembers (vbnc.TypeDeclaration Parent) [0x004c0] in :0 at vbnc.Parser.ParseClassDeclaration (vbnc.ParsedObject Parent, vbnc.Attributes Attributes, System.String Namespace) [0x00299] in :0 at vbnc.Parser.ParseTypeDeclaration (vbnc.ParsedObject Parent, vbnc.Attributes Attributes, System.String Namespace) [0x00013] in :0 at vbnc.Parser.ParseAssemblyMembers (vbnc.AssemblyDeclaration Parent, System.String RootNamespace) [0x00213] in :0 at vbnc.Parser.ParseAssemblyDeclaration (System.String RootNamespace, vbnc.AssemblyDeclaration assembly) [0x000b0] in :0 at vbnc.Parser.Parse (System.String RootNamespace, vbnc.AssemblyDeclaration assembly) [0x00007] in :0 at vbnc.Compiler.Compile_Parse () [0x0013d] in :0 at vbnc.Compiler.Compile () [0x002e1] in :0 Compilation took 00:00:01.3655830

    1/29/2023 13:14:41
    HomeSeer
    Event
    Running script in background (New Event): Jon00DataScraper.vben("Main","1")


    #2
    Looks like you are running the obsolete VBNC compiler

    This should resolve the issue:

    From terminal, enter:

    install -p /usr/bin/vbc /usr/bin/vbnc
    Jon

    Comment


      #3
      Originally posted by jon00 View Post
      Looks like you are running the obsolete VBNC compiler

      This should resolve the issue:

      From terminal, enter:

      install -p /usr/bin/vbc /usr/bin/vbnc
      Thanks, Jon!
      That did the trick! Would have taken me ages to figure that one out.

      However, now I get this in the log (see below).
      There shouldn't be any authentication to the api, at least it works just using the URL in the browser. SSL or certificate issue?

      Log:
      1/29/2023 13:49:13
      Script
      Jon00_DScraper
      Cannot obtain data from path: https://www.hvakosterstrommen.no/api...01-29_NO2.json

      1/29/2023 13:49:13
      Script
      Jon00_DScraper
      [Grab1] Error in Grab Block 3 Error: TrustFailure (Authentication failed, see inner exception.)

      1/29/2023 13:49:13
      HomeSeer
      Event
      Running script in background (Grab energy price): Jon00DataScraper.vben("Main","1")

      1/29/2023 13:49:13
      HomeSeer
      Event
      Event Trigger "Test Grab energy price"

      Comment


        #4
        Try adding under [Grab1]

        SSLMode=3072

        (See page 5 in the docs).
        Jon

        Comment


          #5
          Originally posted by jon00 View Post
          Try adding under [Grab1]

          SSLMode=3072

          (See page 5 in the docs).
          Site uses TLS 1.3, so I already had it at SSLMode=12288 as per the doc. Tried 3072 as well, no success.

          Here is my simple .ini file, just for testing purpose for now:

          [Settings]
          DataLogging=1
          ExpressionLogging=1
          ErrorLogging=1
          IEClearDelay=3

          [Grab1]
          Path=https://www.hvakosterstrommen.no/api/v1/prices/2023/01-29_NO2.json
          PostData=
          TextFile=1
          Encoding=
          Username=
          Password=
          Options=
          UserAgent=
          Devicemode=4
          StripHTML=1
          UseIE=0
          SSLMode=3072
          GroupDevices=1

          Pattern1=JSON> list.0.NOK_per_kWh

          DeviceName1=EnergyPrice
          DeviceText1=[0]
          DeviceValue1=[0]
          DeviceImage1=[100]
          Speakbutton1=
          TriggerString1=
          SearchMode1=1
          TriggerEvent1=​​

          Comment


            #6
            OK, try the advanced SSLMode to ignore Certificate validation:

            SSLMode=*3072
            Jon

            Comment


              #7
              Your Pattern1 should also be:

              Pattern1=JSON> 0.NOK_per_kWh
              Jon

              Comment


                #8
                Originally posted by jon00 View Post
                OK, try the advanced SSLMode to ignore Certificate validation:

                SSLMode=*3072
                Thank you so much, that did the trick!

                Comment

                Working...
                X