How can we help?


Error when trying to upload parser

Comments

5 comments

  • Avatar
    RainMachine Nicholas

    Hi Rick,

    As you probably already found out, it's a Windows only issue since it doesn't send content-type at all. I'm going to add your solution here if others came across the same issue

    which is to rename the *.py file extension to *.txt.

     

     

     

  • Avatar
    Bill

    Thanks for the tip!

    I had the same problem (Windows) trying to upload a new PY weather station (error uploading), and renamed to .TXT..... worked great!

  • Avatar
    noopara (Edited )

    I am getting an error when trying to upload weatherlinkip-parser.py and the txt version of the file.

    The error reported in the log is as follows:

    2018-11-17 17:29:53,001 - ERROR - rmHTTPResourceApi4Dev:68 - API:ParserUpload: Missing required headers
    2018-11-17 17:30:08,564 - INFO  - rmParser:69 - *** Registering parser DavisWeatherLinkIP Parser with interval 21600
    2018-11-17 17:30:08,566 - INFO  - rmParserManager:384 -   * Parser user-weatherlinkip-parser.txt successful loaded from file '/rainmachine-app/RMParserFramework/parsers/user-weatherlinkip-parser.txt'
    2018-11-17 17:30:08,569 - ERROR - rmParserManager:419 -   * Error installing/loading parser user-weatherlinkip-parser.txt from file '/rainmachine-app/RMParserFramework/parsers/user-weatherlinkip-parser.txt'
    2018-11-17 17:30:08,571 - ERROR - rmParserManager:420 - global name 'stationAddress' is not defined
    Traceback (most recent call last):
      File "./RMParserFramework/rmParserManager.py", line 388, in installParser
      File "/rainmachine-app/RMParserFramework/parsers/user-weatherlinkip-parser.txt", line 36, in isEnabledForLocation
    NameError: global name 'stationAddress' is not defined

    One version of the python code (the one that was emailed to me by Nicholas) has a line that defines the stationAddress as 72.83.xxx.xx and another that I copied from github has 192.168.0.1.
    They both cause the error. I changed the ip to the actual ip of my station and continue to get the same error.

     

  • Avatar
    RainMachine Nicholas

    I think something got corrupted or replaced when you downloaded the file or renamed it. I just downloaded the raw file from github and uploaded to RainMachine and worked perfectly. I'd suggest you download it again from raw link and try to upload: https://raw.githubusercontent.com/sprinkler/rainmachine-developer-resources/master/sdk-parsers/RMParserFramework/parsers/weatherlinkip-parser.py

  • Avatar
    noopara

    I figured it out.  The problem was the way I changed the file to a txt file.  What I did was change it from a py file to a txt file.  I was trying to upload weatherlinkip-parser.txt not weatherlinkip-parser.py.txt.

    It's working now. 
     
    Thanks!!

     

Please sign in to leave a comment.