You goofed this part up:

if len(parts) < 1:
    column2 = parts[1]

I'm pretty sure you don't want to access an element that doesn't exist.

But regardless, you don't want to depend on variables that may or may not exist. Be sure to give them some sort of sane default.

Answer from Ignacio Vazquez-Abrams on Stack Overflow
🌐
Log2Base2
log2base2.com › C › basic › variables-in-c.html
Why do we need variables | valid and invalid variable names in c
In the above diagram, memory address 22fe4c has mapped with the variable name letter.
🌐
Quora
quora.com › What-is-valid-and-invalid-c-variable-names
What is valid and invalid c variable names? - Quora
Answer (1 of 7): 1. Variable name should start with letter(a-zA-Z) or underscore (_). Valid age _age Age Invalid 1age 2. In variable name, no special characters allowed other than underscore (_). Valid _age age_ Invalid age_* +age 3.Variables are case sensitive. age and Age are dif...
🌐
Quora
quora.com › What-are-four-examples-of-an-invalid-variable-name
What are four examples of an invalid variable name? - Quora
For example if I create a variable called “white”, but, actually store 0xFF0000, or 0X000000 in the space, that is an invalid variable name. Maybe the name should be “red” (for 0xFF0000), or “black” (for 0x000000), ...
🌐
CompleteEra
completeera.com › java-invalid-variable-name-error-common-causes-and-fixes
**Java Invalid Variable Name Error: Common Causes And Fixes** - CompleteEra
March 2, 2026 - 1. **Starting with a number**: Java doesn’t like it when you name a variable with a number first. For example, `1stPlace` is invalid, but `firstPlace` or `place1` is fine. 2. **Using spaces**: Variables can’t have spaces in their names. If you write `my variable`, Java will get confused.
🌐
Quora
quora.com › What-are-the-rules-of-valid-or-invalid-in-variable-declaration
What are the rules of valid or invalid in variable declaration? - Quora
Answer (1 of 2): Rules for defining Java Identifiers 1. The only allowed characters in Java identifiers are (a to z, A to Z, 0 to 9, $ and_(underscore)). If you are using another character we will get compile time error. total_no (valid) , total# (invalid) 2. Identifiers can’t starts with digits...
Find elsewhere
🌐
Survey Solutions
docs.mysurvey.solutions › questionnaire-designer › components › variable-names
Variable names
October 6, 2022 - The following are examples of valid variable names: age, gender, x25, age_of_hh_head. The following are examples of invalid variable names:
🌐
GitHub
github.com › robotframework › robotframework › issues › 3552
"FAIL: Invalid variable name" when using "Get Variable Value" with variable inside variable · Issue #3552 · robotframework/robotframework
April 20, 2020 - *** Variables *** ${URL} ${EMPTY} ... Value ${URL for stage ${stage}} Set Global Variable ${URL} FAIL : Invalid variable name '${URL for stage ${stage}}'....
Author   grossvati
🌐
Hotdocs
help.hotdocs.com › developer › webhelp › Troubleshooting_1 › t1_receiving_invalid_variable_name_errors_when_creating_components.htm
Receiving 'Invalid Variable Name' Errors When Creating Components
Because HotDocs instruction and expression keywords use uppercase letters, you may inadvertently use a word that may someday become a keyword, which will prevent HotDocs from reading your variable name correctly.
🌐
Medium
patelhemil.medium.com › javascript-rules-for-valid-variable-names-3ba80ae09250
JavaScript : Rules for Valid Variable Names | by Hemil Patel | Medium
April 30, 2019 - Variable names cannot be a keyword. For example, word ‘let’ is considered as a keyword in JavaScript. Hence, you cannot define a variable called ‘let’. The following code snippet results in an error. let let = ‘do not use let as keyword’ // invalid variable name
🌐
Materials Science Community Discourse
matsci.org › lammps
ERROR:Invalid variable reference v_b in variable formula - LAMMPS - Materials Science Community Discourse
November 30, 2022 - Hello! I got a problem when I tried to use a double loop to add force to particles. And I refer to the example in jump command — LAMMPS documentation, but I still got the error message:Invalid variable reference v_b in variable formula . Below is my code: label loopstart variable x loop 200 label loopone variable b loop 200 variable force equal -2.5e-6*v_b fix normol all addforce 0 v_force 0 run 1000 next b jump SELF loopone variable b delete run 5500000 next x jump SELF loopstart ...
🌐
Penn State Statistics
online.stat.psu.edu › stat480 › lesson › 8 › 8.2
8.2 - Invalid Options, Names, or Statements | STAT 480
DATA trees (ROP = crown_ft); --- 22 ERROR 22-7: Invalid option name ROP. input type $ 1-16 circ_in hght_ft crown_ft; DATALINES; NOTE: The SAS System stopped processing this step because of errors. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.03 seconds ; RUN; We'll learn down the road that we can use the DATA statement's DROP= option when we want SAS to drop a variable from the program data vector before writing observations to the output data set.
🌐
Programtopia
programtopia.net › home › c++ programming › variables in c++
Variables in C++ - Programtopia
January 15, 2021 - Some valid variable names are: db_password, _age, calcPercent, x, etc. Some invalid variable names are: 1user, ge, v@lue, !!, *name*, etc.
🌐
GitHub
github.com › nokia › RED › issues › 162
Possibly incorrect "Invalid Variable syntax" error with list and dictionary variables · Issue #162 · nokia/RED
December 8, 2017 - Create Suite Dict Var [Arguments] ${var_name} &{kwargs} ${var_name}= Get Variable Value ${${var_name}} ${var_name} Set Suite Variable &{${var_name}} &{kwargs} produces: Invalid variable syntax '&{${var_name}}'