Comments (5)
Thanks for pointing this out. In python2, the id was of type string which no longer exists in python3 and can be replaced with either Unicode or Bytes. Apparently during porting Gamera to python3, the decision was made to use Bytes for the id. I have just noted that this causes other problems, too, e.g. when calling id.startswith
with a plain string.
Where did you add your workaround of converting the id to a Bytes object? In your copy of teh gamera code? In your application code?
If you can provide a simple test script and simple test data that causes the problem, this would be helpful.
from gamera-4.
We did the fix on our own fork, gamera4-rodan on the branch fix_IC
. The fix is in the file knnmodule.hpp
under this commit.
The error came from our Interactive Classifier python app which calls classify_glyph_automatic
in classify.py
in gamera4. You can see more of the issue here
I'll try to write a simple test case.
from gamera-4.
Did you mange to create a small test case that reproduces the error? I think it would be best to change the id to be Unicode instead of Bytes, but I would need a test case that reproduces the bug and check whether it actually goes away when the changes are made.
from gamera-4.
I have trouble building and testing gamera on my local environment so creating a test script is a bit difficult at the moment. We did experience some issue with another job that uses the same function image_get_id_name
where it is in fact passing in a byte object (that's mean gamera is passing in bytes sometimes and string at other). We got around the issue with an if else to check if the passed in names are string or bytes then convert accordingly.
from gamera-4.
I have trouble building and testing gamera on my local environment so creating a test script is a bit difficult at the moment.
Are there any details on your issues? Maybe there is some guidance available on this.
from gamera-4.
Related Issues (20)
- to_pil/from_pil not reliable HOT 4
- A typo HOT 1
- Python 3.10 build fails: incompatible type for argument 1 of '_Py_HashDouble' HOT 1
- Re-enable CI HOT 3
- Deprecation warnings for VIGRA HOT 4
- Uses deprecated PyObject_CheckReadBuffer and PyObject_AsReadBuffer HOT 2
- When I browse this new commit meaningful pictures are replaced by empty pictures? HOT 5
- test_rle.py::test_rle1 Fatal Python error: Segmentation fault HOT 3
- image.to_grey16() outputs fully black images HOT 2
- 🐞 cknn.group_and_update_list_automatic Assertion error when used for NonInteractive classifier HOT 7
- Deprecation of distutils HOT 5
- Python 3.11 compatibility HOT 8
- Description set to build hint? HOT 2
- Tests break with pytest 7.2.0
- SetuptoolsDeprecationWarning: Installing as data is deprecated HOT 2
- Publish on PyPI? HOT 6
- Unable to save glyphs into separate files HOT 4
- Harmonization of license statements HOT 2
- Trouble installing gamera 4.1.0 HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gamera-4.