Common Problems
This is a list of common errors and problems that users see when using the SolarFarmer web API, and solutions.
It is early days for the life of the web API so check back often to see if additional problems and solutions have been posted.
Check existing solutions first
You may not be alone in having the issue you have. Someone else may have seen the same issue and there may already be a solution. So check these areas first before submitting a support query:
- Check this page first for any existing solutions.
- Search this website for keywords in any errors you are seeing, you may find help here first.
- Check the public forum https://forum.solarfarmer.dnv.com/ to see if anyone else has had similar problems and there has been a solution provided.
Get in touch
If you cannot find a solution and are stuck, please get in touch:
Post a question on the public forum https://forum.solarfarmer.dnv.com/. A member of the SolarFarmer team, or a member of the public may be able to help you.
Note this forum is public so can be seen by everybody, so don't post any sensitive information you're not happy with everyone being able to see. Though we encourage you to share issues and solutions on the forum as much as you can to help the growing SolarFarmer community.
Email solarfarmer@dnv.com with a thorough description of the problem and ideally ways of easily reproducing it.
- Internal DNV employees can use the SolarFarmer Users Teams channel too.
Common Errors
Error: "Number of strings is not a multiple of the rack height"
This occurs in 2D calculations when:
For fixed-tilt rack plants one of the following properties in a
Layout
object does not divide exactly by theNumberOfModulesHigh
value of theMountingTypeSpecification
that is used for theLayout
:TotalNumberOfStrings
NumberOfStringsInIsolatedRow
NumberOfStringsInFrontRow
NumberOfStringsInBackRow
For tracker plants one of the following properties in a
Layout
object does not divide exactly by theNumberOfModulesHigh
value of theMountingTypeSpecification
that is used for theLayout
:TotalNumberOfStrings
NumberOfStringsInIsolatedRow
NumberOfStringsInLeftRow
NumberOfStringsInRightRow
E.g. if NumberOfModulesHigh
is set to 3 (indicating there are 3 rows of modules along the length of a rack) and you set
NumberOfStringsInFrontRow
to be 8, that doesn't divide exactly by 3 (it implies there will be 2 racks containing 3 strings and
1 rack only containing 2 strings - i.e. not fully laden with strings).
Solution - make sure all the properties above are exactly divisible by the NumberOfModulesHigh
value used in the
MountingTypeSpecification
that is used for the Layout
.
Error: "Unauthenticated" (Error status code: 401)
This occurs when there is a problem with the API access token that you are using to access the API.
- Are you using the correct API access token for the API server that you are using?
- Most users use the production server (https://solarfarmer.dnv.com/api) but there are some other servers used for internal development for DNV employees. If using these, a different API access token is required. Go to the web-page of the server you are using, expand the 'Your API access token' panel on the home page, copy to the clipboard and use that.
- Has your API access token expired?
- An easy way to check is to log in to the Web Service website (https://solarfarmer.dnv.com/). The expiry date will be shown there. If it has expired you can regenerate it.
- Has your API access token string been corrupted?
- If you're using the token string directly in a python script, could it have got corrupted somehow? Worth copying it fresh from the API home page and trying again.
If, after checking the above, you still get the 'Unauthenticated' error and you believe it should be working, email solarfarmer@dnv.com and one of our support team can try and understand why and help you get back up and running.
Error: "RBAC: access denied" (Error status code: 403)
This generally occurs when the API token being used is incorrectly specified.
- Have you specified your API token correctly in your scripts?
- It's important when using your API token in the Authentication header that it is specified with the Bearer prefix. See the example in the About Endpoint Tutorial.
- If you are retrieving it from an environment variable, make sure the environment variable is set correctly and your script is retrieving it successfully.
- If it's happening when you're trying the Swagger docs (in https://solarfarmer.dnv.com/docs) then please read Try the endpoints on the API website, taking note of how to authorize the calls.