I've given up. There seems to be an issue with pickling some objects
when you're using mod_wsgi - rather than using xlrd, I just attempted
to add the uploaded file (small file held in memory) to the session
data. The error log was essentially the same, but complaining about an
attempt to pickle a CStringIO object or something instead...

So instead, I'm writing the file to a known disk location and then
loading it back again on the view page, instead of holding it in
session memory. It's dirty and it isn't scalable, but it works for
me :D

Very strange how this all 'just works' when you use the built in dev
server...

David

On Feb 14, 12:50 pm, DavidMck <d...@vidmck.com> wrote:
> Hmm:
>
> My relevant codes seems to be:
>
> @login_required
> def upload(request):
>     if request.method == "POST":
>         form = ExcelUploadForm(request.POST, request.FILES)
>         if form.is_valid():
>             request.session['sheet'] = form.cleaned_data["excelfile"]
>
> If I put something boring into the session (like a string, instead of
> the form.cleaned_data item), the problem goes away. If I leave that
> last line as it is, it comes back...
>
> David

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to