You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In trying to use the linecache.getline() function to extra data from a plain-text database format that I'm building. Every time I make a call to it (even from the interpreter directly) I get an error like the one below. I believe the problem lies in the linecache module itself.
Traceback (most recent call last):
File "/Users/jordanmeyer/Documents/Python/eFlashcard/alpha/0.1a2/eFlashcard_0.1a2.py", line 59, in <module>
eFlashcard_main()
File "/Users/jordanmeyer/Documents/Python/eFlashcard/alpha/0.1a2/eFlashcard_0.1a2.py", line 17, in eFlashcard_main
eFlashcard_build()
File "/Users/jordanmeyer/Documents/Python/eFlashcard/alpha/0.1a2/eFlashcard_0.1a2.py", line 31, in eFlashcard_buildwhilestr(linecache.getline(lib_file, lib_index, module_globals=None)) !='':
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/linecache.py", line 15, in getline
lines = getlines(filename, module_globals)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/linecache.py", line 41, in getlinesreturn updatecache(filename, module_globals)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/linecache.py", line 76, in updatecacheifnot filename or (filename.startswith('<') and filename.endswith('>')):
AttributeError: '_io.TextIOWrapper' object has no attribute 'startswith'
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: