Comments (5)
Did you install the Debian packages?
from osml10n.
I ended up having the same issues already raised in https://github.com/giggls/osml10n/issues/19. So that helped move forward.
Right now, after starting the server like this:
/usr/bin/geo-transcript-srv.py -s -g /usr/share/osml10n/boundaries
I get:
Loading osml10n transcription server: ready.
I open another terminal and cd to /osml10n and type make test. All tests pass ending in a line as follows:
87 tests passed, 0 tests failed.
However, the server spits out errors througout when tests are running:
--- Logging error --- Traceback (most recent call last): File "/usr/lib/python3.10/logging/__init__.py", line 1103, in emit stream.write(msg + self.terminator) ValueError: I/O operation on closed file. Call stack: File "/usr/bin/geo-transcript-srv.py", line 275, in <module> asyncio.run(main()) File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.10/asyncio/base_events.py", line 633, in run_until_complete self.run_forever() File "/usr/lib/python3.10/asyncio/base_events.py", line 600, in run_forever self._run_once() File "/usr/lib/python3.10/asyncio/base_events.py", line 1896, in _run_once handle._run() File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/usr/bin/geo-transcript-srv.py", line 248, in handle_connection reply = tc.transcript(id,cc,name) File "/usr/bin/geo-transcript-srv.py", line 149, in transcript return(cantonese_transcript(unistr)) File "/usr/bin/geo-transcript-srv.py", line 93, in cantonese_transcript transcript=pinyin_jyutping_sentence.jyutping(st, spaces=True) File "/home/alexander/.local/lib/python3.10/site-packages/pinyin_jyutping_sentence/__init__.py", line 390, in process_sentence_jyutping return self.process_sentence(sentence, self.conversion_data.jyutping_word_map, self.conversion_data.jyutping_char_map, self.decode_jyutping, tone_numbers, spaces, remove_tones) File "/home/alexander/.local/lib/python3.10/site-packages/pinyin_jyutping_sentence/__init__.py", line 379, in process_sentence word_list = list(seg_list) File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 325, in cut for word in cut_block(blk): File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 250, in __cut_DAG DAG = self.get_DAG(sentence) File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 181, in get_DAG self.check_initialized() File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 170, in check_initialized self.initialize() File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 113, in initialize default_logger.debug("Building prefix dict from %s ..." % (abs_path or 'the default dictionary')) Message: 'Building prefix dict from the default dictionary ...' Arguments: () --- Logging error --- Traceback (most recent call last): File "/usr/lib/python3.10/logging/__init__.py", line 1103, in emit stream.write(msg + self.terminator) ValueError: I/O operation on closed file. Call stack: File "/usr/bin/geo-transcript-srv.py", line 275, in <module> asyncio.run(main()) File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.10/asyncio/base_events.py", line 633, in run_until_complete self.run_forever() File "/usr/lib/python3.10/asyncio/base_events.py", line 600, in run_forever self._run_once() File "/usr/lib/python3.10/asyncio/base_events.py", line 1896, in _run_once handle._run() File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/usr/bin/geo-transcript-srv.py", line 248, in handle_connection reply = tc.transcript(id,cc,name) File "/usr/bin/geo-transcript-srv.py", line 149, in transcript return(cantonese_transcript(unistr)) File "/usr/bin/geo-transcript-srv.py", line 93, in cantonese_transcript transcript=pinyin_jyutping_sentence.jyutping(st, spaces=True) File "/home/alexander/.local/lib/python3.10/site-packages/pinyin_jyutping_sentence/__init__.py", line 390, in process_sentence_jyutping return self.process_sentence(sentence, self.conversion_data.jyutping_word_map, self.conversion_data.jyutping_char_map, self.decode_jyutping, tone_numbers, spaces, remove_tones) File "/home/alexander/.local/lib/python3.10/site-packages/pinyin_jyutping_sentence/__init__.py", line 379, in process_sentence word_list = list(seg_list) File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 325, in cut for word in cut_block(blk): File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 250, in __cut_DAG DAG = self.get_DAG(sentence) File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 181, in get_DAG self.check_initialized() File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 170, in check_initialized self.initialize() File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 146, in initialize default_logger.debug( Message: 'Dumping model to file cache /tmp/jieba.cache' Arguments: () --- Logging error --- Traceback (most recent call last): File "/usr/lib/python3.10/logging/__init__.py", line 1103, in emit stream.write(msg + self.terminator) ValueError: I/O operation on closed file. Call stack: File "/usr/bin/geo-transcript-srv.py", line 275, in <module> asyncio.run(main()) File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.10/asyncio/base_events.py", line 633, in run_until_complete self.run_forever() File "/usr/lib/python3.10/asyncio/base_events.py", line 600, in run_forever self._run_once() File "/usr/lib/python3.10/asyncio/base_events.py", line 1896, in _run_once handle._run() File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/usr/bin/geo-transcript-srv.py", line 248, in handle_connection reply = tc.transcript(id,cc,name) File "/usr/bin/geo-transcript-srv.py", line 149, in transcript return(cantonese_transcript(unistr)) File "/usr/bin/geo-transcript-srv.py", line 93, in cantonese_transcript transcript=pinyin_jyutping_sentence.jyutping(st, spaces=True) File "/home/alexander/.local/lib/python3.10/site-packages/pinyin_jyutping_sentence/__init__.py", line 390, in process_sentence_jyutping return self.process_sentence(sentence, self.conversion_data.jyutping_word_map, self.conversion_data.jyutping_char_map, self.decode_jyutping, tone_numbers, spaces, remove_tones) File "/home/alexander/.local/lib/python3.10/site-packages/pinyin_jyutping_sentence/__init__.py", line 379, in process_sentence word_list = list(seg_list) File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 325, in cut for word in cut_block(blk): File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 250, in __cut_DAG DAG = self.get_DAG(sentence) File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 181, in get_DAG self.check_initialized() File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 170, in check_initialized self.initialize() File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 164, in initialize default_logger.debug( Message: 'Loading model cost 0.375 seconds.' Arguments: () --- Logging error --- Traceback (most recent call last): File "/usr/lib/python3.10/logging/__init__.py", line 1103, in emit stream.write(msg + self.terminator) ValueError: I/O operation on closed file. Call stack: File "/usr/bin/geo-transcript-srv.py", line 275, in <module> asyncio.run(main()) File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.10/asyncio/base_events.py", line 633, in run_until_complete self.run_forever() File "/usr/lib/python3.10/asyncio/base_events.py", line 600, in run_forever self._run_once() File "/usr/lib/python3.10/asyncio/base_events.py", line 1896, in _run_once handle._run() File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/usr/bin/geo-transcript-srv.py", line 248, in handle_connection reply = tc.transcript(id,cc,name) File "/usr/bin/geo-transcript-srv.py", line 149, in transcript return(cantonese_transcript(unistr)) File "/usr/bin/geo-transcript-srv.py", line 93, in cantonese_transcript transcript=pinyin_jyutping_sentence.jyutping(st, spaces=True) File "/home/alexander/.local/lib/python3.10/site-packages/pinyin_jyutping_sentence/__init__.py", line 390, in process_sentence_jyutping return self.process_sentence(sentence, self.conversion_data.jyutping_word_map, self.conversion_data.jyutping_char_map, self.decode_jyutping, tone_numbers, spaces, remove_tones) File "/home/alexander/.local/lib/python3.10/site-packages/pinyin_jyutping_sentence/__init__.py", line 379, in process_sentence word_list = list(seg_list) File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 325, in cut for word in cut_block(blk): File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 250, in __cut_DAG DAG = self.get_DAG(sentence) File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 181, in get_DAG self.check_initialized() File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 170, in check_initialized self.initialize() File "/home/alexander/.local/lib/python3.10/site-packages/jieba/__init__.py", line 166, in initialize default_logger.debug("Prefix dict has been built successfully.") Message: 'Prefix dict has been built successfully.' Arguments: ()
are this "normal"/expected errors?... I'm going to check if another issue has been raised previously.
from osml10n.
You should not need to start the Server manually, the Debian package should do this for you.
Unfortunately I can not reproduce this easily as I do not use ubuntu. Will try to check this inside a chroot.
from osml10n.
OK, I can reproduce this in my Ubuntu 22.04 chroot.
Looks like this stderr redirection hack no longer works in Python 3.10
Does not seem to harm functionality though.
I will see what I can do.
from osml10n.
Thank you for looking into it.
from osml10n.
Related Issues (20)
- run at ubuntu return error HOT 2
- missing debhelper HOT 3
- Osm2pgsql failed due to ERROR: Error loading lua config HOT 13
- Server cannot utilize tltk library HOT 12
- mml file HOT 1
- Ubuntu 22.04 Luarocks command in INSTALL.md HOT 5
- Some tests fail: 85 tests passed, 2 tests failed HOT 3
- Error when running make test HOT 3
- transcription-daemon does not auto-start after debian packages are installed. HOT 4
- lake of osml10n.control HOT 1
- Debian 12 Bookworm Support? HOT 14
- add osml10n as extention to postgreSQL HOT 2
- make deb error HOT 1
- free(): invalid size Aborted Core dumped HOT 5
- Unable to get any output HOT 6
- Add GitHub description HOT 3
- Error when make tests is used HOT 1
- Add full Makefile HOT 9
- Possibility to run without a daemon HOT 4
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 osml10n.