Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error message for displaying ERRORs #2

Open
GoogleCodeExporter opened this issue May 5, 2015 · 1 comment
Open

error message for displaying ERRORs #2

GoogleCodeExporter opened this issue May 5, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. make sure django DEBUG is set to TRUE
2. upload a file
3. do not make column selections for at least one field on the 2nd page
4. hit submit

What is the expected output? What do you see instead?

You should see a page displaying the rows with errors in them.
However, you receive a Django type error "cannot concatenate 'str' and
'IntegrityError' objects"

What version of the product are you using? On what operating system?

I"m using Python 2.5.2  running on Ubuntu. 
django-batchimport. Version 0.1 introduction import. This appears to be the
latest as of this writing. I SVN'd it only 4 days ago.

Please provide any additional information below.

I found a solution to this. The problem is this line...

status_msg = 'spreadsheet row#' + str(row)+' ERROR: ' + sys.exc_info()[1]

is trying to concatenate an IntegrityError object.

I simply converted these two objects to strings before concatenation...

status_msg = 'spreadsheet row#' + str(row)+ str(' ERROR: ') +
str(sys.exc_info()[1])


Original issue reported on code.google.com by davidyna...@gmail.com on 20 Jan 2009 at 8:54

@GoogleCodeExporter
Copy link
Author

p.s. the line I changed is line 290 in batchimport/views.py

Original comment by davidyna...@gmail.com on 20 Jan 2009 at 8:56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant