seems like an import error....
if you changed something in it, did you try restarting web2py ?

BTW: I couldn't find excelpy source, but for basic "exporting" without 
needs of formatting, I'm veeeery happy with tablib 
http://docs.python-tablib.org/ (discovered that in this list!)

Il giorno mercoledì 13 giugno 2012 23:18:21 UTC+2, Janath ha scritto:
>
> Hi,
>
> I try to use excelpy module in web2py, and it raises following error. I do 
> the same in python and it works properly.
>
> my code in controller is:
>
> def excelpy_test():
>
>     import excelpy
>
>     exl_temp=excelpy.workbook('perturb')
>
>     exl_temp.show()
>
>
> Be kind to let me know if working with excelpy in web2py is not a good 
> idea. So I can try doing another way. 
>
> Workarounds to generate .csv files are welcome.
>
>
> Appreciate help!
> Janath
>
>
>
>
> TICKET ID
>
> 127.0.0.1.2012-06-13.16-11-18.027f232a-2c5b-4944-a3ba-a56467d3302c
> <type 'exceptions.AttributeError'> xlLandscapeVERSIONweb2py™(1, 99, 7, 
> datetime.datetime(2012, 3, 4, 22, 12, 8), 'stable')PythonPython 2.5.1: 
> C:\Python25\pythonw.exeTRACEBACK
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
> 15.
>
> Traceback (most recent call last):
>   File "C:\Users\umgeegan\Desktop\web2py_src\web2py\gluon\restricted.py", 
> line 205, in restricted
>     exec ccode in environment
>   File 
> "C:/Users/umgeegan/web2py_src/web2py/applications/PythonPSSE/controllers/default.py"
>  
> <http://127.0.0.1:8000/admin/default/edit/PythonPSSE/controllers/default.py>, 
> line 220, in <module>
>   File "C:\Users\umgeegan\Desktop\web2py_src\web2py\gluon\globals.py", line 
> 173, in <lambda>
>     self._caller = lambda f: f()
>   File 
> "C:/Users/umgeegan/web2py_src/web2py/applications/PythonPSSE/controllers/default.py"
>  
> <http://127.0.0.1:8000/admin/default/edit/PythonPSSE/controllers/default.py>, 
> line 139, in excelpy_test
>     exl_temp=excelpy.workbook('perturb')
>   File ".\excelpy.py", line 1753, in workbook
>   File ".\excelpy.py", line 186, in __init__
>   File ".\excelpy.py", line 1398, in _get_constants
>   File "C:\Python25\lib\site-packages\win32com\client\__init__.py", line 168, 
> in __getattr__
>     raise AttributeError, a
> AttributeError: xlLandscape
>
> ERROR SNAPSHOT [image: help]
>
> <type 'exceptions.AttributeError'>(xlLandscape)
>
> inspect attributes
> Frames
>    
>    - 
>    
>    *File C:\Users\umgeegan\Desktop\web2py_src\web2py\gluon\restricted.py 
>    in restricted at line 205* code arguments variables
>    - 
>    
>    *File 
>    
> C:\Users\umgeegan\web2py_src\web2py\applications\PythonPSSE\controllers\default.py
>  
>    in <module> at line 220* code arguments variables
>    - 
>    
>    *File C:\Users\umgeegan\Desktop\web2py_src\web2py\gluon\globals.py in 
>    <lambda> at line 173* code arguments variables
>    - 
>    
>    *File 
>    
> C:\Users\umgeegan\web2py_src\web2py\applications\PythonPSSE\controllers\default.py
>  
>    in excelpy_test at line 139* code arguments variables
>    - 
>    
>    *File C:\Users\umgeegan\web2py_src\web2py\excelpy.py in workbook at 
>    line 1753* code arguments variables
>    - 
>    
>    *File C:\Users\umgeegan\web2py_src\web2py\excelpy.py in __init__ at 
>    line 186* code arguments variables
>    - 
>    
>    *File C:\Users\umgeegan\web2py_src\web2py\excelpy.py in _get_constants 
>    at line 1398* code arguments variables
>    - 
>    
>    *File C:\Python25\lib\site-packages\win32com\client\__init__.py in 
>    __getattr__ at line 168* code arguments variables
>    Function argument list
>    
>    (self=<win32com.client.Constants instance at 0x0752BE40>, 
>    a='xlLandscape')
>    Code listing
>    
>    163.
>    164.
>    165.
>    166.
>    167.
>    168.
>    
>    169.
>    170.
>    171.
>    172.
>    
>        self.__dicts__ = [] # A list of dictionaries
>      def __getattr__(self, a):
>        for d in self.__dicts__:
>          if d.has_key(a):
>            return d[a]
>        raise AttributeError, a
>    
>    
>    # And create an instance.
>    constants = Constants()
>    
>    Variablesa'xlLandscape'builtinAttributeError<type 
>    'exceptions.AttributeError'>
>    
>    
>

Reply via email to