Skip to content

compilesketches.py error before compile that related to recent update #284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
M-ichae-l opened this issue Jun 13, 2024 · 2 comments · Fixed by #285
Closed
3 tasks done

compilesketches.py error before compile that related to recent update #284

M-ichae-l opened this issue Jun 13, 2024 · 2 comments · Fixed by #285
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@M-ichae-l
Copy link

M-ichae-l commented Jun 13, 2024

Describe the problem

I have use this action to do CI check for all examples. However, it gives me errors found in py files. I have tried last week passed action to re-run the error also comes out. I guess it related with some code recent update used by this GitHub actions. I have tried with main and v1.1.0, neither can work. Found the arduino-cli has an update today. Maybe it is the update cause the issue.

https://github.com/ambiot/ambpro2_arduino/actions/runs/9492771613/job/26160846238

File "/home/runner/work/_actions/arduino/compile-sketches/main/compilesketches/compilesketches.py", line 563, in get_platform_installation_path
if installed_platform[self.cli_json_key("core list", "ID")] == platform[self.dependency_name_key]:
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: string indices must be integers, not 'str'

To reproduce

basic/default use of the action

Expected behavior

Can run compilesketches with no process error.

'arduino/compile-sketches' version

main / v1.1.0

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details
@M-ichae-l M-ichae-l added the type: imperfection Perceived defect in any part of project label Jun 13, 2024
@per1234 per1234 self-assigned this Jun 13, 2024
@per1234 per1234 added status: in progress Work is in progress on this topic: code Related to content of the project itself labels Jun 13, 2024
@per1234 per1234 added conclusion: resolved Issue was resolved and removed status: in progress Work is in progress on this labels Jun 13, 2024
@per1234
Copy link
Collaborator

per1234 commented Jun 13, 2024

Thanks for your report @M-ichae-l. As you guessed, this was caused by breaking changes that were made in the 1.0.0 release of Arduino CLI. By default, the arduino/compile-sketches uses the latest release of Arduino CLI so the workflows automatically started using Arduino CLI 1.0.0 as soon as that release came out.

The bug has been fixed and shipped via a new 1.1.1 release. I submitted a pull request to update the version of the action in your workflow: Ameba-AIoT/ameba-arduino-pro2#246

@M-ichae-l
Copy link
Author

Thank you! Many thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants