NameError: global name 'eprint' is not defined
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 305
- PR merge metrics
- No merged PRs in 30d
Description
Hey, we are using xlsx2csv to import sheets and it generally works fine.
Recently, while trying to upload a specific sheet we got the following error:
File "/home/rof/.pyenv/versions/2.7.16/bin/xlsx2csv", line 817, in handleCharData
eprint("Error: potential invalid date format.")
NameError: global name 'eprint' is not defined
We moved the eprint method at the top of the file, and the script worked with only a warning as I assume was intended, but I am not sure if that is a correct solution?
thanks
ac
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the xlsx2csv entry point and the handleCharData function around line 817, then trace where eprint is defined and available. Reproduce the invalid-date warning and confirm the command reports the warning without raising a NameError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100