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

Camera calibration not saving tarfile #68

Closed
miquelmassot opened this issue May 6, 2014 · 2 comments
Closed

Camera calibration not saving tarfile #68

miquelmassot opened this issue May 6, 2014 · 2 comments

Comments

@miquelmassot
Copy link
Contributor

Hi,

when I've tried to save a calibration using the SAVE button, python outputs:

Traceback (most recent call last):
File "/opt/ros/hydro/lib/camera_calibration/cameracalibrator.py", line 205, in on_mouse
self.c.do_save()
File "/opt/ros/hydro/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 511, in do_save
self.do_tarfile_save(tf) # Must be overridden in subclasses
File "/opt/ros/hydro/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 826, in do_tarfile_save
taradd(name, cv.EncodeImage(".png", im).tostring())
File "/opt/ros/hydro/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 817, in taradd
s = StringIO.StringIO(buf)
AttributeError: type object '_io.StringIO' has no attribute 'StringIO'

and no file is saved. The code line reported is in https://github.com/ros-perception/image_pipeline/blob/indigo/camera_calibration/src/camera_calibration/calibrator.py#L817

May that be an import error?

@vrabaud
Copy link
Contributor

vrabaud commented May 6, 2014

could you please replace the line with:
s = StringIO(buf)
and line 36 with :
from cStringIO import StringIO
If that works, please make a pull request with the fixes.

vrabaud added a commit that referenced this issue May 6, 2014
Fix #68: StringIO issues in calibrator.py
@vrabaud
Copy link
Contributor

vrabaud commented May 6, 2014

fixed through #70

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

No branches or pull requests

2 participants