What does your project directory tree look like? I suspect the error has to 
do with where your documents/ directory is located in relation to the 
working directory. Try loading the document using a path relative to your 
project root.

-Jacky Tian


On Friday, June 21, 2013 9:29:20 AM UTC-4, Nigel Legg wrote:
>
> New to Django(ish).  I'm not sure whether my error is coding or OS related:
> I am getting the following error message:
>
> IOError at /myapp/file_view/4/ 
>
> [Errno 2] No such file or directory: 'documents/2013/06/20/testdata1.csv'
>
>  Request Method: GET  Request URL: 
> http://127.0.0.1:8000/myapp/file_view/4/  Django Version: 1.5.1  Exception 
> Type: IOError  Exception Value: 
>
> [Errno 2] No such file or directory: 'documents/2013/06/20/testdata1.csv'
>
>  Exception Location: C:\stats_portal\myproject\myproject\myapp\fileview.py 
> in filedata, line 5  Python Executable: c:\python27\python.exe  Python 
> Version: 2.7.5  Python Path: 
>
> ['C:\\stats_portal\\myproject',
>  'c:\\python27\\lib\\site-packages\\python_dateutil-1.5-py2.7.egg',
>  'c:\\python27\\lib\\site-packages\\django_directupload-0.0.11-py2.7.egg',
>  'C:\\windows\\system32\\python27.zip',
>  'c:\\python27\\DLLs',
>  'c:\\python27\\lib',
>  'c:\\python27\\lib\\plat-win',
>  'c:\\python27\\lib\\lib-tk',
>  'c:\\python27',
>  'c:\\python27\\lib\\site-packages']
>
>  Server time: Fri, 21 Jun 2013 14:09:20 +0100
> Is the file not found problem because the upload has recorded it as 
> documents/2013/06/... even though I am working on Windows, so python / 
> django should have ... documents\\2013\\06\\... etc? I am developing on 
> Windows, but will deploy on Linux. 
> Or have I made an error elsewhere?  
>
>
> Regards,
> Nigel Legg
> 07914 740972
> http://twitter.com/nigellegg
> http://uk.linkedin.com/in/nigellegg
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to