TextRecognitionDataGenerator icon indicating copy to clipboard operation
TextRecognitionDataGenerator copied to clipboard

always appear "generate() takes 27 positional arguments but 30 were given "

Open terrancraft opened this issue 5 years ago • 10 comments

Type the command below but it doesn't work. Please help~ image

terrancraft avatar Dec 08 '20 06:12 terrancraft

Error Type: image

terrancraft avatar Dec 08 '20 06:12 terrancraft

Hi, unsure what is causing this issue, does it happen with master?

Belval avatar Dec 10 '20 16:12 Belval

Hi~ I'm afraid I don't fairly understand. What do you mean by 'master'?

terrancraft avatar Dec 16 '20 09:12 terrancraft

Master is the name of the main branch of the repository. If you git clone the project you should be using master by default.

Belval avatar Dec 16 '20 15:12 Belval

I also have this problem in win10 after I type the command "python run.py -c 10 -l cn". This problem looks like happened on run.py line 459 "total = args.count"

PS:I create a new environment in ubuntu 18.04 and all package versions followthe description in requirements.txt. After that, It works. I think the problem may be caused by the package version mismatch. In win10 my tensorflow version is 2.2.0,but in requirements.txt it's 1.13.0.

stq-hydra avatar Jan 21 '21 09:01 stq-hydra

Thank you for taking the time to dig deeper here, I appreciate it. I'll try to reproduce it on my side.

Belval avatar Jan 22 '21 03:01 Belval

Is there a specific version of trdg that is causing this issue? On Windows 10 with 1.7.0 I did not get any error.

Belval avatar Jan 22 '21 03:01 Belval

I just clone this repository yesterday(master branch) in server(Ubuntu 18.04) and my PC(win10),run "python run.py -c 10 -l cn" in pycharm terminal and got this error. In my PC,almost all package version follow the requirement.txt,but the tensorflow version not follow the requirements_hw.txt. So I say the problem may be caused by tensorflow version.

stq-hydra avatar Jan 22 '21 07:01 stq-hydra

I am also getting this issue. It is very frustrating that the beginning of the program just failed. Please fix it

yunchaogong avatar Apr 03 '21 08:04 yunchaogong

I also had the same problem, it was my fault. The problem was due to the generate function of FakeTextDataGenerator in data_generator.py. In the case of version 1.6.0 (installed through pip), there are 27 parameters of the function, but in the case of master branch (git clone), 3 are added and thus 30. When using the master code, you should check if the 1.6.0 version of trdg is used when importing. solution: sync source to master or 1.6.0. should not be mixed.

whwnsdlr1 avatar Apr 13 '21 03:04 whwnsdlr1