scott1028 / pyfpdf

Automatically exported from code.google.com/p/pyfpdf
GNU Lesser General Public License v3.0
0 stars 0 forks source link

import_csv errors due to hard-coded example file #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. install 'web2py.app.fpdf.w2p'
2. Visit the 'default.py' controller page in the admin interface
3. Click the 'import_csv' action in the 'exposes' list

Traceback (most recent call last):
  File "/Users/lrivers/Documents/CurrentProjects/SPTI/trunk/web2py/gluon/restricted.py", line 188, in restricted
    exec ccode in environment
  File "/Users/lrivers/Documents/CurrentProjects/SPTI/trunk/web2py/applications/FPDF/controllers/default.py", line 326, in <module>
  File "/Users/lrivers/Documents/CurrentProjects/SPTI/trunk/web2py/gluon/globals.py", line 96, in <lambda>
    self._caller = lambda f: f()
  File "/Users/lrivers/Documents/CurrentProjects/SPTI/trunk/web2py/applications/FPDF/controllers/default.py", line 163, in import_csv
    f.parse_csv(infile="/home/reingart/web2py/gluon/contrib/pyfpdf/invoice.csv", delimiter=";", decimal_sep=",")
  File "/Users/lrivers/Documents/CurrentProjects/SPTI/trunk/web2py/gluon/contrib/pyfpdf/template.py", line 37, in parse_csv
    for row in csv.reader(open(infile, 'rb'), delimiter=delimiter):
IOError: [Errno 2] No such file or directory: 
'/home/reingart/web2py/gluon/contrib/pyfpdf/invoice.csv'

I would suggest putting that file in the 'static' directory of the appliance 
and calling it from there.

Original issue reported on code.google.com by lriv...@mosasaur.com on 27 Nov 2010 at 8:10

GoogleCodeExporter commented 8 years ago
I dont get this?

Original comment by egzontin...@gmail.com on 18 Aug 2015 at 4:19