Why is openpyxl is required for loading excel format files?

0 votes

I am using anaconda spyder 2.7 on windows 10 64 bit. I am also using psychopy software. There is an error coming which says openpyxl is required to load excel format files. I have installed openpyxl, but still there is a same error. I have also tried to modify the data.py line 29:

from 
openpyxl.cell import get_column_letter 
into:
openpyxl.utils import get_column_letter

but there is no difference. I am sending you the code and traceback. It would be really helpful if someone can solve this error.

base_dir =  os.path.normpath('C:\\Users\\ravikumar.mevada\\Gustometer\\qmix\\examples')
conditions_file = os.path.join(base_dir, 'fat_taste.xlsx')
data_dir = os.path.join(base_dir, 'Data_out_fat')
outfile = os.path.join(data_dir,'output_fat_taste')

#import .xlsx file
conditions = data.importConditions(conditions_file)

#screen resolution #TODO: not used
width = GetSystemMetrics(0) 
height = GetSystemMetrics(1)

#assign to each taste a specific pump
tastants_pumps = {'sweet1':pump_1,'sweet2':pump_3,'sweet3':pump_4, 'water':pump_5}
Traceback (most recent call last):

 File "<ipython-input-9-291e52893b5d>", line 7, in <module>
conditions = data.importConditions(conditions_file)

 File "C:\Users\ravikumar.mevada\Anaconda2\lib\site-packages\psychopy\data.py", line 2667, in importConditions
 raise ImportError('openpyxl is required for loading excel '

 ImportError: openpyxl is required for loading excel format files, but it was not found. 
May 10, 2018 in Python by aryya
• 7,370 points
208 views

1 answer to this question.

0 votes

Well, it sounds like openpyxl is not installed properly. Maybe installed to a different Python? You need to use the anaconda help though, as this really doesn’t look like a PsychoPy problem

answered Aug 8, 2018 by Priyaj
• 57,530 points
It got solved by uninstalling and reinstalling the openpyxl. Thank you very much.

Related Questions In Python

0 votes
1 answer

What data format for large files in R?

Zipping won't help you, as you'll have ...READ MORE

answered Jul 16, 2019 in Python by SDeb
• 13,250 points
51 views
0 votes
1 answer

Is there a built-in module to handle excel files in python?

You can use the module - openpyxl ...READ MORE

answered Aug 19, 2019 in Python by Mohammad
• 3,230 points
46 views
0 votes
1 answer

String is immutable data type. String.replace() So why there is command for string to replace the values....??

Hey, @Nelson, replace() actually returns a *copy* of ...READ MORE

answered Mar 30 in Python by Gitika
• 31,430 points
116 views
0 votes
1 answer

Python join: why is it string.join(list) instead of list.join(string)?

950down voteaccepted It's because any iterable can be ...READ MORE

answered May 15, 2018 in Python by aryya
• 7,370 points
112 views
+1 vote
1 answer

What is the correct order to learn concepts in Python for machine learning?

Machine Learning is a vast domain. It ...READ MORE

answered Jul 25, 2018 in Python by Abhi
• 3,680 points
160 views
0 votes
1 answer

What is the Python equivalent for a case/switch statement?

if x == 'a':  # Do the ...READ MORE

answered Jul 26, 2018 in Python by Priyaj
• 57,530 points
220 views
0 votes
1 answer

Python join: why is it string.join(list) instead of list.join(string)?

This is because join is a "string" ...READ MORE

answered Jul 30, 2018 in Python by Priyaj
• 57,530 points
132 views
0 votes
1 answer

Why there is no do while loop in python

There is no do...while loop because there ...READ MORE

answered Aug 6, 2018 in Python by Priyaj
• 57,530 points
931 views
0 votes
1 answer

ImportError: openpyxl is required for loading excel format files

Forget the PsychoPy complications for the time ...READ MORE

answered Oct 3, 2018 in Python by Priyaj
• 57,530 points
106 views
0 votes
1 answer

What is the flow control for “continue” in python?

This is the way "continue" statement works! You ...READ MORE

answered Jul 16, 2018 in Python by Priyaj
• 57,530 points
92 views