Giter VIP home page Giter VIP logo

adif_merge's People

Contributors

mend-bolt-for-github[bot] avatar pleasantone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mpeuster

adif_merge's Issues

ValueError: could not convert string to float: 'NA-052'

adif_merge 1.1.2
Python 3.8.5

Problem
When trying to merge two ADIF files together, I got the following error:

$ .local/bin/adif_merge -o mergelog.adif -c log.log -p problem.json Log4OM_ADIF_20201231232432.adi qdure-123120-log_KC2IEB.adi
Traceback (most recent call last):
  File ".local/bin/adif_merge", line 8, in <module>
    sys.exit(main())
  File "/home/cwawak/.local/lib/python3.8/site-packages/adif_merge/__init__.py", line 543, in main
    qsos.append(fixup_qso(qso, filename))
  File "/home/cwawak/.local/lib/python3.8/site-packages/adif_merge/__init__.py", line 177, in fixup_qso
    qso[field] = int(float(qso[field]))
ValueError: could not convert string to float: 'NA-052'

It looks like it's choking on parsing an IOTA reference:

<ANT_AZ:1>0 <ANT_EL:1>0 <STATE:2>FL <BAND:3>30m <BAND_RX:3>30m <CALL:4>N1UL <CONT:2>NA
<COUNTRY:13>United States <CNTY:11>FL, Collier <CQZ:1>5 <DISTANCE:4>1672 <DXCC:3>291 
<EMAIL:14>xxx<EQSL_QSL_RCVD:1>R <EQSL_QSL_SENT:1>R <FREQ:9>10.137200 <FREQ_RX:9>10.137200 
<GRIDSQUARE:4>EL95 <ITUZ:1>6 <LOTW_QSLSDATE:8>20201112 <LOTW_QSL_RCVD:1>N <LOTW_QSL_SENT:1>Y 
<MODE:3>FT8 <MY_CITY:15>xxxx <MY_CNTY:10>xxxx <MY_COUNTRY:13>United States 
<MY_CQ_ZONE:1>5 <MY_DXCC:3>291 <MY_GRIDSQUARE:4>FM29 <MY_ITU_ZONE:1>8 <MY_NAME:19>xxxx 
<MY_STATE:2>xxxx <NAME:19>xxxx <STATION_CALLSIGN:6>xxxx <PROGRAMID:7>LOG4OM2 
<PROGRAMVERSION:8>2.10.0.0 <QSL_RCVD:1>N <QSL_RCVD_VIA:1>E <QSL_SENT:1>N <QSL_SENT_VIA:1>E 
<QSL_VIA:46>ARRL, BETTER DIRECT, RETURN CARD ALSO DIRECT ! <QSO_COMPLETE:1>Y <QSO_DATE:8>20201111 
<QSO_DATE_OFF:8>20201111 <QTH:12>xxxx <RST_RCVD:3>-01 <RST_SENT:3>+15 <SWL:1>N 
<TIME_OFF:6>120800 <TIME_ON:6>120800 <TX_PWR:3>100 <QSO_RANDOM:1>Y <SFI:1>0 
<QRZCOM_QSO_UPLOAD_DATE:8>20201112 <QRZCOM_QSO_UPLOAD_STATUS:1>Y <IOTA:6>NA-052 
<IOTA_ISLAND_ID:6>NA-052 <APP_L4ONG_SATELLITE_QSO:1>N <APP_L4ONG_CONTEST:1>N 
<APP_L4ONG_QSO_CONFIRMATIONS:578>[{"CT":"LOTW","S":"Yes","R":"No","SV":"Electronic","RV":"Electronic","SD":"2020-11-12T00:00:00Z"},{"CT":"QSL","S":"No","R":"No","SV":"Electronic","RV":"Electronic"},
{"CT":"QRZCOM","S":"Yes","R":"No","SV":"Electronic","RV":"Electronic","SD":"2020-11-12T00:00:00Z"},
{"CT":"EQSL","S":"Requested","R":"Requested","SV":"Electronic","RV":"Electronic"},
{"CT":"HAMQTH","S":"Requested","R":"No","SV":"Electronic","RV":"Electronic"},
{"CT":"HRDLOG","S":"Requested","R":"No","SV":"Electronic","RV":"Electronic"},
{"CT":"CLUBLOG","S":"Requested","R":"No","SV":"Electronic","RV":"Electronic"}] <APP_L4ONG_QSO_AWARD_REFERENCES:280>[{"AC":"IOTA","R":"NA-052","G":"NA-052","SUB":[],"GRA":[]},
{"AC":"DXCC","R":"291","G":"NA","SUB":[],"GRA":[]},{"AC":"USA-CA","R":"FL-COLLIER","SUB":[],"GRA":[]},
{"AC":"WAC","R":"NA","SUB":[],"GRA":[]},{"AC":"WAS","R":"FL","SUB":[],"GRA":[]},{"AC":"WAZ","R":"5","SUB":[],"GRA":[]}] 
<EOR>

Expected Behavior
I'd expect to be able to merge these files without errors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.