Hi
I just tried to recompile some code after a few days of inactivity and I am getting a compile error from one of the lower level libraries.
Here is the trace-back in PlatformIO:
Building .pio/build/wiscore_rak4631/firmware.hex
Building .pio/build/wiscore_rak4631/firmware.zip
Traceback (most recent call last):
File “/home/alan/.local/bin/adafruit-nrfutil”, line 8, in
sys.exit(cli())
File “/home/alan/.platformio/penv/lib/python3.8/site-packages/click/core.py”, line 1137, in call
return self.main(*args, **kwargs)
File “/home/alan/.platformio/penv/lib/python3.8/site-packages/click/core.py”, line 1062, in main
rv = self.invoke(ctx)
File “/home/alan/.platformio/penv/lib/python3.8/site-packages/click/core.py”, line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/alan/.platformio/penv/lib/python3.8/site-packages/click/core.py”, line 1666, in invoke
sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
File “/home/alan/.platformio/penv/lib/python3.8/site-packages/click/core.py”, line 923, in make_context
self.parse_args(ctx, args)
File “/home/alan/.platformio/penv/lib/python3.8/site-packages/click/core.py”, line 1379, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File “/home/alan/.platformio/penv/lib/python3.8/site-packages/click/core.py”, line 2364, in handle_parse_result
value = self.process_value(ctx, value)
File “/home/alan/.platformio/penv/lib/python3.8/site-packages/click/core.py”, line 2320, in process_value
value = self.type_cast_value(ctx, value)
File “/home/alan/.platformio/penv/lib/python3.8/site-packages/click/core.py”, line 2307, in type_cast_value
return convert(value)
File “/home/alan/.platformio/penv/lib/python3.8/site-packages/click/types.py”, line 75, in call
return self.convert(value, param, ctx)
File “/home/alan/.local/lib/python3.8/site-packages/nordicsemi/main.py”, line 64, in convert
if value.lower() == ‘none’:
AttributeError: ‘int’ object has no attribute ‘lower’
*** [.pio/build/wiscore_rak4631/firmware.zip] Error 1
========================================== [FAILED] Took 25.20 seconds ==========================================
The terminal process “platformio ‘run’” terminated with exit code: 1.
Hi Bernd,
I had only pressed the compile ‘button’ so I’m confused as to why it was trying to flash the device (which wasn’t even connected). I’ve had problems in the past where I have tried to flash the device when it wasn’t connected and it just came up with serial connection errors. Visual code has recently been updated in my Ubuntu system and maybe PlatformIO as well.
I’ll try again with the device connected
For me, PlatformIO sometimes acts up strangely on older projects.
What I usually do is to delete the complete .pio folder of the project and then try again to compile.
I’m still getting the same problem. I have tried connecting the device; I have tried to install the build and I have deleted the .pio directory.
I also checked my libraries were up to date and upgraded 2: SX126x-Arduino to 2.0.5 and Sparkfun u-blox GNSS to 2.0.15.
I know this is not really your problem as it is an issue with the IDE, but I’m hoping you might give me some pointers as to what to try next.
Another thing I have just noticed.
The compiler has produced the .elf and .hex files , but not the .zip file. So it looks like it might failing during that process?
It looks like adafruit-nrfutil fails to create the ZIP file. But this Python error output is confusing. I have no idea why it fails with
File “/home/alan/.local/lib/python3.8/site-packages/nordicsemi/main.py”, line 64, in convert
if value.lower() == ‘none’:
AttributeError: ‘int’ object has no attribute ‘lower’
Can you try to compile the same code for adafruit_feather_nrf52840 instead of wiscore_rak4631. That would show if the problem is within the BSP extension for WisBlock.
My PlatformIO version is the same as yours.
My Nordic nRF52 version is 8.1.0
I have now upgraded it to 8.3.0, but it can no longer find wiscore_rak4631
Thanks for this.
It is apparently some weirdness in Code. It is complaining in the buzzer.cpp file that WB_I03 is undefined, but it compiles fine and the buzzer works (apart from drawing 300mA).
The standard library does compile, I can tell you that much. So either your project configuration is wrong, or clicker counter something in your code … The most common cause of compilation errors is a Sntax error . Syntax errors are errors in the form of the raw source code, usually caused by some violation of the computer language’s principles.