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

ERROR TypeError : list indices must be integers or slices, not str #45

Open
MetPhoto opened this issue Jun 20, 2023 · 7 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@MetPhoto
Copy link

With the updated script I see:

ERROR TypeError : list indices must be integers or slices, not str

@Gentleman1983 Gentleman1983 added the bug Something isn't working label Jun 20, 2023
@jee67
Copy link

jee67 commented Jun 22, 2023

Same problem here. What's causing it and is there a quick workaround?

@jee67
Copy link

jee67 commented Jun 22, 2023

Same problem here. What's causing it and is there a quick workaround?

Seems that ' Update ginlong_solis_api_connector.py #44 ' is causing this. When I remove it, code works again.

@TobiO79
Copy link
Collaborator

TobiO79 commented Jun 30, 2023

is this issue still in the latest version?

@MetPhoto
Copy link
Author

Now I get the error
ERROR ValueError : invalid literal for int() with base 10: ''

@TobiO79
Copy link
Collaborator

TobiO79 commented Jul 1, 2023

In our enviroment the latest image runs with no errors. Please post your ENVs (without the API Keys...) and the complete Log...

@MetPhoto
Copy link
Author

MetPhoto commented Jul 1, 2023

2023-07-01 12:57:27,448 INFO Started ginlong-solis-api-connector
2023-07-01 12:57:27,449 DEBUG Running job Job(interval=5, unit=minutes, do=main, args=(), kwargs={})
2023-07-01 12:57:27,449 ERROR ValueError : invalid literal for int() with base 10: ''
2023-07-01 12:57:27,450 INFO Next run is scheduled at 01/07/2023 13:02:00

export SOLIS_CLOUD_API_URL='https://www.soliscloud.com'
export SOLIS_CLOUD_API_PORT='13333'
export SOLIS_CLOUD_API_INVERTER_ID='0'
export SOLIS_CLOUD_API_BATTERY_ID='1'
export SOLIS_CLOUD_API_OVERRIDE_SINGLE_PHASE_INVERTER='true'
export SOLIS_CLOUD_API_NUMBER_RETRIES='3'
export SOLIS_CLOUD_API_RETRIES_WAIT_S='1'
export USE_INFLUX='true'
export INFLUX_DATABASE='ginglong'
export INFLUX_DATABASE_BATTERY='solarbattery'
export INFLUX_SERVER='xxx.xxx.xxx.xxx'
export INFLUX_PORT='8086'
export INFLUX_USER='solarpv'
export INFLUX_USER_BATTERY='AAAA'
export INFLUX_PASSWORD='AAAA'
export INFLUX_PASSWORD_BATTERY='AAAA'
export INFLUX_MEASUREMENT='PV'
export INFLUX_MEASUREMENT_BATTERY='PVBAT'
export TZ='Europe/London'
export LOG_LEVEL='DEBUG'
export METSCHEDULE='5'
export USE_PVOUTPUT='false'
export PVOUTPUT_API_KEY=''
export PVOUTPUT_SYSTEM_ID=''
export PVOUTPUT_EXTENDED_V7=''
export PVOUTPUT_EXTENDED_V8=''
export PVOUTPUT_EXTENDED_V9=''
export PVOUTPUT_EXTENDED_V10=''
export PVOUTPUT_EXTENDED_V11=''
export PVOUTPUT_EXTENDED_V12=''
export USE_MQTT='false'
export MQTT_CLIENT_ID=''
export MQTT_SERVER=''
export MQTT_USERNAME=''
export MQTT_PASSWORD=''
export MQTT_TOPIC=''
export MQTT_PORT=''

@Flecky13
Copy link

Flecky13 commented Jul 19, 2023

The problem seems to be related to the battery

Since I connected my battery I get this error

2023-07-19 23:52:00,848 ERROR TypeError : list indices must be integers or slices, not str
2023-07-19 23:52:01,849 INFO Next run is scheduled at 19/07/2023 23:57:00

(ENV)-----------------------------------------------
- name: LOG_LEVEL
value: "DEBUG"
- name: TZ
value: "Europe/Berlin"
- name: SOLIS_CLOUD_API_KEY_ID
value: "xxxxxxxxxxxxxxxxxxxxxxxxxx"
- name: SOLIS_CLOUD_API_KEY_SECRET
value: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
- name: SOLIS_CLOUD_API_INVERTER_ID
value: "0"
- name: USE_MQTT
value: "true"
- name: MQTT_CLIENT_ID
value: solis_wr
- name: MQTT_SERVER
value: "172.17.2.213"
- name: MQTT_TOPIC
value: STROM
- name: MQTT_PORT
value: "1883"
- name: MQTT_USERNAME
value: xxxxxx
- name: MQTT_PASSWORD
value: xxxxxxxxxxxxxxxxxx
- name: USE_INFLUX
value: "true"
- name: INFLUX_DATABASE
value: "openhab_db"
- name: INFLUX_SERVER
value: "172.17.2.204"
- name: INFLUX_PORT
value: "8086"
- name: INFLUX_PASSWORD
value: "xxxxxxx"
- name: INFLUX_USER
value: "xxxxxxxx"
- name: INFLUX_MEASUREMENT
value: "PV"

(LOG)-----------------------------------------------
},
"page": {
"records": [
{
"id": "xxxxxxxxxxxxxxxxxxxxxxx",
"dataTimestamp": "1689803431569",
"dataTimestampStr": "19/07/2023 23:50:31 (UTC+01:00)",
"fullHour": 3.22,
"dayPowerGeneration": 3.22,
"monthCarbonDioxide": 64.2,
"userId": "xxxxxxxxxxxxxxxxxxxx",
"sno": "180798",
"country": "26613",
"countryStr": "Deutschland",
"region": "147125",
"regionStr": "Hessen",
"city": "42635",
"cityStr": "R\u00fcsselsheim am Main",
"county": "126769",
"countyStr": "Bauschheim",
"state": 1,
"dip": 30.0,
"azimuth": 0.0,
"power": 0.0,
"timeZone": 1.0,
"timeZoneName": "(UTC+01:00)Europe/Amsterdam",
"timeZoneStr": "(UTC+01:00)",
"timeZoneId": "48",
"daylight": 0,
"powerStr": "kW",
"createDate": 1684081879000,
"createDateStr": "14/05/2023 18:31:19 (UTC+01:00)",
"connectTime": 1683907200000,
"connectTimeStr": "13/05/2023",
"price": 0.082,
"module": "2",
"capacity": 6.62,
"capacityStr": "kWp",
"capacityPercent": 0.0,
"capacity1": 6.62,
"pic1Url": "https://ginlong-it-test.oss-eu-central-1.aliyuncs.com/STATION_default_user.png?Expires=1689818219&OSSAccessKeyId=LTAI5tDfhhsnNuC3fr5HU1rK&Signature=vGpYlJxAo1eyUioX6zaIKbVMOjY%3D&x-oss-process=image%2Fresize%2Cm_fill%2Cw_100%2Ch_100",
"dayEnergy": 21.3,
"dayEnergyStr": "kWh",
"dayIncome": 1.746,
"monthEnergy": 425.0,
"monthEnergyStr": "kWh",
"yearEnergy": 1.784,
"yearEnergyStr": "MWh",
"allEnergy": 1.784,
"allEnergyStr": "MWh",
"allEnergy1": 1784.0,
"allIncome": 37.966,
"updateDate": 1689381857000,
"type": 0,
"synchronizationType": 0,
"epmType": 0,
"gridSwitch": 0,
"gridSwitch1": 0,
"shareProcess": 1,
"alarmLongStr": "--",
"dcInputType": 1,
"stationTypeNew": 1,
"batteryTotalDischargeEnergy": 31.0,
"batteryTotalChargeEnergy": 32.0,
"gridPurchasedTotalEnergy": 37.64,
"gridSellTotalEnergy": 83.56,
"homeLoadTotalEnergy": 1625.0,
"oneSelf": 7.6,
"batteryTodayDischargeEnergy": 3.0,
"batteryTodayChargeEnergy": 4.0,
"gridPurchasedTodayEnergy": 1.46,
"gridSellTodayEnergy": 13.7,
"homeLoadTodayEnergy": 8.06,
"oneSelfTotal": 379.44,
"money": "EUR",
"condTxtD": "Few Clouds",
"condCodeD": "102",
"simFlowState": -1,
"groupId": ",216379,",
"jxbType": 0,
"inverterCount": 1,
"monthEnergy1": 425.0,
"dayEnergy1": 21.3,
"yearEnergy1": 1784.0,
"power1": 0.0
}
],
"total": 1,
"size": 20,
"current": 1,
"orders": [],
"optimizeCountSql": false,
"searchCount": true,
"pages": 1
},
"mpptSwitch": 0
}
}
2023-07-19 23:52:00,848 ERROR TypeError : list indices must be integers or slices, not str
2023-07-19 23:52:01,849 INFO Next run is scheduled at 19/07/2023 23:57:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants