sa7818 / GDD

Growing Degree Days in Canada
0 stars 1 forks source link

The error of "Expected file path name or file-like object, got <class 'NoneType'> type" #18

Closed SharonQSY closed 8 years ago

SharonQSY commented 8 years ago

Hi guys, Does anyone meet this problem in Python? And do you have any suggestions to fix this problem?

fd6713 commented 8 years ago

You have to pass a valid file name to that function. The 'None' is being passed and the error says that you cannot use None for the file path.

SharonQSY commented 8 years ago

When I am passing the file name into the function, and When I try to print the data in the file. It can show data in the terminal. But, it also shows the error.I just did not get it, why it shows I am passing None.

SharonQSY commented 8 years ago

It worked. I indeed passing the filename of none type.