canal-php icon indicating copy to clipboard operation
canal-php copied to clipboard

PHP Warning: unpack(): Type N: not enough input, need 4, have 0 in

Open lujihong opened this issue 3 years ago • 1 comments

PHP Warning: unpack(): Type N: not enough input, need 4, have 0 in /opt/www/vendor/xingwenge/canal_php/src/adapter/swoole/CanalConnector.php on line 34

Warning: unpack(): Type N: not enough input, need 4, have 0 in /opt/www/vendor/xingwenge/canal_php/src/adapter/swoole/CanalConnector.php on line 34 PHP Notice: Trying to access array offset on value of type bool in /opt/www/vendor/xingwenge/canal_php/src/adapter/swoole/CanalConnector.php on line 34

Notice: Trying to access array offset on value of type bool in /opt/www/vendor/xingwenge/canal_php/src/adapter/swoole/CanalConnector.php on line 34 unexpected packet type:0 PHP Warning: unpack(): Type N: not enough input, need 4, have 0 in /opt/www/vendor/xingwenge/canal_php/src/adapter/swoole/CanalConnector.php on line 34

Warning: unpack(): Type N: not enough input, need 4, have 0 in /opt/www/vendor/xingwenge/canal_php/src/adapter/swoole/CanalConnector.php on line 34 PHP Notice: Trying to access array offset on value of type bool in /opt/www/vendor/xingwenge/canal_php/src/adapter/swoole/CanalConnector.php on line 34

lujihong avatar Jul 06 '21 10:07 lujihong

Hi @LinuxBeginner,

Thank you for your interest in our work!

I would recommend to first replicate some bilingual ST experiment (for example: for the pair en-de of MuST-C) and go through the steps in run.sh (located under egs/must_c/st1/run.sh) to understand how to prepare the data.

The final data (to feed step 4 - Training) needs to be in a .json format including information such as utterance ID, path to features, raw input/output text, tokenized text, etc. For your reference, a sample .json file including 2 utterances can be found here: sample.json.txt (please make sure to remove .txt after downloading). After understanding the steps and the required format, I think you can tailor the preparation script to your own dataset.

For your information, we are also working on a fairseq implementation and will be releasing it in a few weeks. Stay tuned!

formiel avatar May 19 '21 16:05 formiel