KD4Z / md380tools-vm

Enhanced Toolkit for md380tools- MD-380 / MD-390 / Retevis RT3 or RT8 radios. Windows VM or Linux
97 stars 28 forks source link

user.bin is not normal size. #42

Open ghost opened 4 years ago

ghost commented 4 years ago

I've looked at the code myself, but I don't really understand the TypeError. Using Python 3.

`hans@G510:~$ glvusers Archive: /home/hans/md380tools-vm/nicknames.zip inflating: user.nicknames
Downloading data from RadioId.net...Normalizing...done Downloading data from HamDigital.org...Normalizing...done Downloading alternate data....done Traceback (most recent call last): File "/home/hans/md380tools-vm/merge_users.py", line 2256, in enable_options = [upperFirst(x["name"]) for x in sorted(optionList)] TypeError: '<' not supported between instances of 'dict' and 'dict' Merging data... Contact Merge completed. RadioId count : 152226 records (8362895 bytes) HamDigital count : 152038 records (5994772 bytes) Alternate count : 0 records (0 bytes) Nickname count : 4482 records Records skipped : 4 records See /home/hans/merge.errors The Downloads for Contact information may have failed - run glvusers again before running flashdb, as the user.bin is not normal size.

Merged total : 0 records (0 bytes) User.bin filesize : 0 bytes (not including header record) Processing complete. Run menu to return to the main menu screen `

KD4Z commented 4 years ago

The Alternate count of 0 is indicating some sort of connectivity issue exists from github to you. It should not be 0, but should show approximately 153409 records as of right now. That url is: https://github.com/BM-Database/database/raw/master/user.bin You could attempt to manually download it from the Toolkit session using wget and see if it resolves. Did you open up the merge.errors file and see what it contains? I am not able to reproduce your error at this point. If you haven't run glv in a while, you should run it occasionally just to pull down any script changes. You could optionally enable the "extra.data.disable" tweak, which would bypass the portions of the scripting that pertains to the Alternate data.

khaytsus commented 4 years ago

Most likely this is the same issue I have; the addstatic script is calling "python" explicitly on the merge_users.py script when merge_users.py is Python 2 only. More and more distros, python is python 3.

Either call it directly (merge_users.py has python2 in its shebang) or change this to python2. I don't know how distro portable that is offhand.

javastraat commented 4 years ago

the alternate count error is due to url change we made a pull request back in dec 2019

khaytsus commented 4 years ago

the alternate count error is due to url change we made a pull request back in dec 2019

Could be a reason for it to fail; but I've updated code etc, so I'm on the latest. The merge_users.py script is executed with python, which on my system is Python 2, which fails.

File "/home/hans/md380tools-vm/merge_users.py", line 2256, in enable_options = [upperFirst(x["name"]) for x in sorted(optionList)] TypeError: '<' not supported between instances of 'dict' and 'dict'