Q:

Opening/Attempting to Read a file

I tried to simply read and store the contents of a text file into an array, but:
ins = open( "file.txt", "r" )
array = []
for line in ins:
    array.append( line )
ins.close()

It gives me an error for "open":
Unresolved reference 'open' less... (Ctrl+F1) 

This inspection detects names that should resolve but don't.  Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases.  Top-level and class-level items are supported better than instance items.  
Can anyone explain what I'm doing wrong? 
Thanks

A:

This is a known issue in PyCharm, when it fails to update its cache of the interpreter.  It happens most often if you install a new interpreter, update packages, etc. 
You can search for this and related issues at the pycharm bug tracker
Its a temporary problem and will resolve itself.   Keep an eye on the bottom right of the PyCharm window where it displays notifications (next to the icon of the guy in the hat).  Click on this and the Event Log will have some messages for you. 
If its really bothering you, you can hit ALT+ENTER and click "Ignore unresolved reference open"

