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 ariaholic
• 7,340 points
145 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,300 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 in Python by SDeb
• 13,230 points
36 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 in Python by Mohammad
• 3,170 points
23 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 ariaholic
• 7,340 points
50 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 Anmol
• 3,620 points
84 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,300 points
111 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,300 points
82 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,300 points
216 views
+1 vote
1 answer

What is the function for Factorial in Python

Easiest way: math.factorial(x) (available in 2.6 and ...READ MORE

answered Aug 21, 2018 in Python by Priyaj
• 57,300 points

edited Aug 21, 2018 by Omkar 169 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,300 points
59 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,300 points
65 views