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

hql.py: when querying masks, filter bytes field #230

Merged
merged 1 commit into from
Jul 2, 2020

Conversation

joshmoore
Copy link
Member

omero hql "select s from Shape s" or similar fails with

UnicodeEncodeError: 'utf-8' codec can't encode character '\udcb0' in position 3797: surrogates not allowed

due to the bytes field.

`omero hql "select s from Shape s"` or similar fails with

```
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcb0' in position 3797: surrogates not allowed
```

due to the bytes field.
@joshmoore
Copy link
Member Author

This is the only field with that name:

(cd /opt/omero-build/omero-model/src/main/resources/mappings/; git grep bytes)
roi.ome.xml:            <optional name="bytes" type="byte[]"/>

Copy link
Member

@manics manics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

$ omero hql 'FROM Mask ' --limit 2

Error printing text
Traceback (most recent call last):
...
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcf8' in position 779: surrogates not allowed

During handling of the above exception, another exception occurred:

vs

$ omero hql 'FROM Mask ' --limit 2

 # | Class | Id      | details         | theZ | roi          | fillColor   | x    | y     | width | height
---+-------+---------+-----------------+------+--------------+-------------+------+-------+-------+--------
 0 | MaskI | 1664225 | owner=2;group=3 | 3    | RoiI:1380865 | -2139062144 | 31.0 | 852.0 | 37.0  | 37.0
 1 | MaskI | 1664226 | owner=2;group=3 | 4    | RoiI:1380865 | -2139062144 | 28.0 | 849.0 | 42.0  | 42.0
(2 rows)

@manics manics merged commit 8b22bb4 into ome:master Jul 2, 2020
@joshmoore joshmoore deleted the filter-bytes branch July 2, 2020 13:27
@manics manics mentioned this pull request Jul 9, 2020
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

Successfully merging this pull request may close these issues.

2 participants