Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

Fix BagMigrationException in migrate_raw#917

Merged
dirk-thomas merged 1 commit intoros:kinetic-develfrom
efernandez:fix_migrate_raw_exception
Oct 26, 2016
Merged

Fix BagMigrationException in migrate_raw#917
dirk-thomas merged 1 commit intoros:kinetic-develfrom
efernandez:fix_migrate_raw_exception

Conversation

@efernandez
Copy link
Copy Markdown
Contributor

Take the ._type using [0], because the arguments passed to migrate_raw are tuples.

This was throwing another exception because of that bug: AttributeError, saying that tuple has no attribute _type:

new_msg_raw = migrator.migrate_raw(msg_raw, new_msg_raw)

File "/opt/ros/indigo/lib/python2.7/dist-packages/rosbag/migration.py", line 1042, in migrate_raw

raise BagMigrationException("Migrate called, but no valid migration path from [%s] to [%s]"%(msg_from._type, msg_to._type))'

"AttributeError: 'tuple' object has no attribute '_type'\n"

Take the ._type using [0], because the arguments passed to migrate_raw
are tuples.

This was throwing another exception because of that bug: AttributeError,
saying that tuple has no attribute _type.
@efernandez
Copy link
Copy Markdown
Contributor Author

I've tested the fixed, and now I see the proper exception being thrown. 😃

Migrate called, but no valid migration path from [my_msgs/Message] to [my_msgs/Message]

@efernandez
Copy link
Copy Markdown
Contributor Author

@dirk-thomas

@dirk-thomas
Copy link
Copy Markdown
Member

Thank you.

@dirk-thomas dirk-thomas merged commit 1e478ef into ros:kinetic-devel Oct 26, 2016
@efernandez efernandez deleted the fix_migrate_raw_exception branch October 27, 2016 00:11
rsinnet pushed a commit to MisoRobotics/ros_comm that referenced this pull request Jun 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants