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

ImageField error when using the width_field and height_field #1

Closed
octothorp opened this Issue Jan 4, 2011 · 8 comments

Comments

Projects
None yet
2 participants
@octothorp
Copy link

octothorp commented Jan 4, 2011

When I define width_field and height_field on ImageField that under django-cumuls I get the following error:

Exception Type: AttributeError
Exception Value: 'Object' object has no attribute 'tell'
Exception Location: /home/webuser/public_html/apps/aml/parts/aml/django/core/files/utils.py in , line 22

When I remove the width_field and height_field attributes of the ImageField the upload works just fine.

From the bottom of the stack trace:
/home/webuser/public_html/apps/aml/parts/aml/django/core/files/utils.py in

  1. tell = property(lambda self: self.file.tell)
@richleland

This comment has been minimized.

Copy link
Contributor

richleland commented Jan 4, 2011

What version of Django are you using?

@octothorp

This comment has been minimized.

Copy link
Author

octothorp commented Jan 4, 2011

I am using 1.2.3,

@richleland

This comment has been minimized.

Copy link
Contributor

richleland commented Jan 4, 2011

Thanks - I'll take a peek and see what I can dig up...

@octothorp

This comment has been minimized.

Copy link
Author

octothorp commented Jan 4, 2011

Thanks, it's a great package and a real help in the site I am building.

@richleland

This comment has been minimized.

Copy link
Contributor

richleland commented Jan 8, 2011

OK, this is definitely an issue with anything greater than 1.1.x. On it!

@richleland

This comment has been minimized.

Copy link
Contributor

richleland commented Jan 8, 2011

There was a change to file position pointing in django/core/files/image.py. Should have a fix for this in cumulus this weekend.

@richleland

This comment has been minimized.

Copy link
Contributor

richleland commented Jan 8, 2011

Fixed issue where image attrs were not accessible. Closed by 4f35742.

cloudfiles.storage_object.Object returns an object that has no tell method. Versions
Django > 1.1.x rely on the file's tell method. Since it's easy for us to grab the
position of the file I simply pointed the tell method at an internal _get_pos.

@octothorp

This comment has been minimized.

Copy link
Author

octothorp commented Jan 10, 2011

Thanks for the quick assist!

raistlin7447 referenced this issue in raistlin7447/django-cumulus Jun 14, 2013

Merge pull request mkai#1 from raistlin7447/master
Resolved issue with ThreadSafeCloudFilesStorage not using authurl, timeout, or servicenet settings.

izquierdo pushed a commit to izquierdo/django-cumulus that referenced this issue Oct 10, 2014

Merge pull request django-cumulus#1 from izquierdo/nodelete
Fix the add_only/no_delete syncstatic options

This issue was closed.

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