• AVR Freaks

Hot!Harmony V3 Python Scripts Encoding Problem

Author
MPARLA
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2020/01/24 23:34:30
  • Location: 0
  • Status: offline
2020/01/28 15:04:51 (permalink)
0

Harmony V3 Python Scripts Encoding Problem

      Hi, Friends,
   I'm new user harmony V3 and newly installed on Windows 10 Pro (OS Language Turkish Language) with all of updates.  I create a project with ATSAMD21E18A mcu. I noticed that The configurator doesn't create Device Family Pack component. I found the reason, ERROR with DFP.py file can not create MCU parts names contains 'i' letter. While I found a solution with ALL of the components with names contain 'i' letter like 'eic.h', 'qspi.h', 'hbmatrix.h', ... vs. to convert 'i' letters to 'I' letters. For example
 I convert eic.h to EIC.h.
    Now there is one problem with configurator. When I drag drop some components ( name contains 'i' letter) like EIC from
avaliable components window, It doesn't add to Project Graph windows also to Project. The error message is below from mhc.log.  What can I do for this encoding problems ?
 
 

<Event>[Info]: Broadcasting event: LogErrorEvent -
<Configuration Database>[Error]: Failed to activate component: eic
<Log>[Error]: Exception cause: Traceback (most recent call last):
File "C:\Harmony3\csp\arch\../peripheral/eic_u2217/config/eic.py", line 124, in instantiateComponent
extIntCount = int(extIntNode.getAttribute("value"))
AttributeError: 'NoneType' object has no attribute 'getAttribute'
<MHC>[Info]: Stack trace filtered due to currently set log level. See "C:\Users\musta\.mh3\mhc.log" for full details.
<MHC>[Info]: To change log level filter see Tools->Options->Harmony in MPLABX
<Event>[Info]: Broadcasting event: RefreshUIEvent -

#1

5 Replies Related Threads

    arpananand
    Super Member
    • Total Posts : 488
    • Reward points : 0
    • Joined: 2009/11/18 04:35:42
    • Location: 0
    • Status: offline
    Re: Harmony V3 Python Scripts Encoding Problem 2020/02/02 22:23:53 (permalink)
    0
    "I found the reason, ERROR with DFP.py file can not create MCU parts names contains 'i' letter."
     
    How are you able to conclude that? there should not be such constraint of letter "i" not allowed. what is the error you are getting when you try everything with default setting i.e. without changing the names? 
    #2
    MPARLA
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2020/01/24 23:34:30
    • Location: 0
    • Status: offline
    Re: Harmony V3 Python Scripts Encoding Problem 2020/02/03 01:56:44 (permalink)
    0
    Hi,
    Because of Configurator doesn't create DFP component on Project Graph, I looked into mhc.log.
    DFP.py file creates component from MCU's Include Directory ( see mhc log below), but when eic.h will be created,
    The error occurs. And then When I drag EIC component from avaliable component window, the second error occurs.
    These errors only occurs files with names contain 'i' letter. (Like hmatrixb.h, qspi.h, .. )


    This error while creating config :
    [Info]: Creating file symbol dfp:PART_PERIPH_AC_DEFS
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file relative path flag dfp:PART_PERIPH_AC_DEFS:false
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file source path dfp:PART_PERIPH_AC_DEFS:C:\Harmony3\dev_packs\Microchip\SAMD21_DFP\3.2.84\samd21a/include/component/ac.h
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file output name dfp:PART_PERIPH_AC_DEFS:ac.h
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file destination path dfp:PART_PERIPH_AC_DEFS:../../packs/ATSAMD21E18A_DFP/component/
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file project path dfp:PART_PERIPH_AC_DEFS:packs/ATSAMD21E18A_DFP/component/
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file output type dfp:PART_PERIPH_AC_DEFS:HEADER
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Creating file symbol dfp:PART_PERIPH_ADC_DEFS
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file relative path flag dfp:PART_PERIPH_ADC_DEFS:false
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file source path dfp:PART_PERIPH_ADC_DEFS:C:\Harmony3\dev_packs\Microchip\SAMD21_DFP\3.2.84\samd21a/include/component/adc.h
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file output name dfp:PART_PERIPH_ADC_DEFS:adc.h
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file destination path dfp:PART_PERIPH_ADC_DEFS:../../packs/ATSAMD21E18A_DFP/component/
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file project path dfp:PART_PERIPH_ADC_DEFS:packs/ATSAMD21E18A_DFP/component/
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file output type dfp:PART_PERIPH_ADC_DEFS:HEADER
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Creating file symbol dfp:PART_PERIPH_DAC_DEFS
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file relative path flag dfp:PART_PERIPH_DAC_DEFS:false
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file source path dfp:PART_PERIPH_DAC_DEFS:C:\Harmony3\dev_packs\Microchip\SAMD21_DFP\3.2.84\samd21a/include/component/dac.h
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file output name dfp:PART_PERIPH_DAC_DEFS:dac.h
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file destination path dfp:PART_PERIPH_DAC_DEFS:../../packs/ATSAMD21E18A_DFP/component/
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file project path dfp:PART_PERIPH_DAC_DEFS:packs/ATSAMD21E18A_DFP/component/
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file output type dfp:PART_PERIPH_DAC_DEFS:HEADER
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Creating file symbol dfp:PART_PERIPH_DMAC_DEFS
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file relative path flag dfp:PART_PERIPH_DMAC_DEFS:false
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file source path dfp:PART_PERIPH_DMAC_DEFS:C:\Harmony3\dev_packs\Microchip\SAMD21_DFP\3.2.84\samd21a/include/component/dmac.h
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file output name dfp:PART_PERIPH_DMAC_DEFS:dmac.h
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file destination path dfp:PART_PERIPH_DMAC_DEFS:../../packs/ATSAMD21E18A_DFP/component/
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file project path dfp:PART_PERIPH_DMAC_DEFS:packs/ATSAMD21E18A_DFP/component/
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file output type dfp:PART_PERIPH_DMAC_DEFS:HEADER
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Creating file symbol dfp:PART_PERIPH_DSU_DEFS
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file relative path flag dfp:PART_PERIPH_DSU_DEFS:false
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file source path dfp:PART_PERIPH_DSU_DEFS:C:\Harmony3\dev_packs\Microchip\SAMD21_DFP\3.2.84\samd21a/include/component/dsu.h
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file output name dfp:PART_PERIPH_DSU_DEFS:dsu.h
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file destination path dfp:PART_PERIPH_DSU_DEFS:../../packs/ATSAMD21E18A_DFP/component/
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file project path dfp:PART_PERIPH_DSU_DEFS:packs/ATSAMD21E18A_DFP/component/
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting file output type dfp:PART_PERIPH_DSU_DEFS:HEADER
    [Info]: Broadcasting event: LogErrorEvent -
    [Error]: Failed to activate component: dfp
    [Error]: Exception cause: Traceback (most recent call last):
    File "C:\Harmony3\csp\arch\config/dfp.py", line 74, in instantiateComponent
    szSymbol = "PART_PERIPH_{}_DEFS".format(headerFileName[:-2].upper())
    UnicodeEncodeError: 'ascii' codec can't encode character u'\u0130' in position 1: ordinal not in range(128)
    [Info]: Stack trace filtered due to currently set log level. See "C:\Users\musta\.mh3\mhc.log" for full details.
    [Info]: To change log level filter see Tools->Options->Harmony in MPLABX

     
    and second one while I want to drag drop EIC component :
     
    [Info]: Creating string symbol eic:EIC_INSTANCE_NAME
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting visible value eic:EIC_INSTANCE_NAME:false
    [Info]: Broadcasting event: SymbolVisualChangedEvent - eic:EIC_INSTANCE_NAME
    [Info]: Broadcasting event: DirtyEvent -
    [Info]: Broadcasting event: LogDebugEvent -
    [Info]: Setting default value eic:EIC_INSTANCE_NAME:Eރ
    [Info]: Broadcasting event: SymbolValueChangedEvent - eic:EIC_INSTANCE_NAME
    [Info]: Broadcasting event: Global Dirty Event -
    [Info]: Broadcasting event: ComponentStateChangedEvent - __ROOTVIEW
    [Info]: Broadcasting event: LogErrorEvent -
    [Error]: Failed to activate component: eic
    [Error]: Exception cause: Traceback (most recent call last):
    File "C:\Harmony3\csp\arch\../peripheral/eic_u2217/config/eic.py", line 124, in instantiateComponent
    extIntCount = int(extIntNode.getAttribute("value"))
    AttributeError: 'NoneType' object has no attribute 'getAttribute'
    [Info]: Stack trace filtered due to currently set log level. See "C:\Users\musta\.mh3\mhc.log" for full details.
    [Info]: To change log level filter see Tools->Options->Harmony in MPLABX
    [Info]: Broadcasting event: RefreshUIEvent -

    #3
    arpananand
    Super Member
    • Total Posts : 488
    • Reward points : 0
    • Joined: 2009/11/18 04:35:42
    • Location: 0
    • Status: offline
    Re: Harmony V3 Python Scripts Encoding Problem 2020/02/03 03:40:31 (permalink)
    0
    i don't face any such problem when i create a new H3 project for the mentioned device. can you tell your MHC, CSP and dev_packs version? hope you are using them all latest?
     
    you can consider cleaning the repos and re-cloning them as well.
     
    #4
    ric
    Super Member
    • Total Posts : 26973
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Harmony V3 Python Scripts Encoding Problem 2020/02/03 03:44:33 (permalink)
    0
    I have no idea why, but is "Turkish Language Windows" the unique aspect here?
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #5
    MPARLA
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2020/01/24 23:34:30
    • Location: 0
    • Status: offline
    Re: Harmony V3 Python Scripts Encoding Problem 2020/02/03 07:48:38 (permalink)
    0
    Hi, My IDE version is MPLABX 5.30. Harmony 3 configurator is updated and also all of the package (csp, mhc, dev_packs, .... vs) are updated to the latest version. and Harmony Configurator path is "C:\Harmony3\".  Harmony Configurator doesn't create DFP in Project Graph window and the Peripherals like eic, qspi that names contain 'i' letter couldn't add the project graph. 
     
    I tried to change Operating System Language from TURKISH to ENGLISH. Then Configurator did not do any error. I think it is about pyhton scrips like dfp.py use different encoding (UTF-8, UTF-16, ?? ) than the OS encoding type.
     
     
     
     
    #6
    Jump to:
    © 2020 APG vNext Commercial Version 4.5