Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

`match': invalid byte sequence in UTF-8 (ArgumentError) on Windows #248

Copy link
Copy link
Closed
@Nykkolas

Description

@Nykkolas
Issue body actions

System

  • OS:Windows
  • ruby -v: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x64-mingw32]
  • bundle -v: Bundler version 2.1.4
  • bundle info arduino_ci:
 * arduino_ci (1.1.0)
        Summary: Tools for building and unit testing Arduino libraries
        Homepage: http://github.com/Arduino-CI/arduino_ci
        Path: D:/Progs/Ruby27-x64/lib/ruby/gems/2.7.0/gems/arduino_ci-1.1.0

Issue Summary

Hello

When I run bundle exec arduino_ci.rb --skip-examples-compilation and the "libraries/symlink" exists I have an error :

Installing library under test... Traceback (most recent call last):
        11: from D:/Progs/Ruby27-x64/bin/arduino_ci.rb:23:in `<main>'
        10: from D:/Progs/Ruby27-x64/bin/arduino_ci.rb:23:in `load'
         9: from D:/Progs/Ruby27-x64/lib/ruby/gems/2.7.0/gems/arduino_ci-1.1.0/exe/arduino_ci.rb:399:in `<top (required)>'    
         8: from D:/Progs/Ruby27-x64/lib/ruby/gems/2.7.0/gems/arduino_ci-1.1.0/exe/arduino_ci.rb:129:in `assure'
         7: from D:/Progs/Ruby27-x64/lib/ruby/gems/2.7.0/gems/arduino_ci-1.1.0/exe/arduino_ci.rb:102:in `perform_action'      
         6: from D:/Progs/Ruby27-x64/lib/ruby/gems/2.7.0/gems/arduino_ci-1.1.0/exe/arduino_ci.rb:400:in `block in <top (required)>'
ll_local_library'
         4: from D:/Progs/Ruby27-x64/lib/ruby/gems/2.7.0/gems/arduino_ci-1.1.0/lib/arduino_ci/host.rb:93:in `symlink?'        
         3: from D:/Progs/Ruby27-x64/lib/ruby/gems/2.7.0/gems/arduino_ci-1.1.0/lib/arduino_ci/host.rb:106:in `readlink'       
         2: from D:/Progs/Ruby27-x64/lib/ruby/gems/2.7.0/gems/arduino_ci-1.1.0/lib/arduino_ci/host.rb:106:in `map'
         1: from D:/Progs/Ruby27-x64/lib/ruby/gems/2.7.0/gems/arduino_ci-1.1.0/lib/arduino_ci/host.rb:106:in `block in readlink'
D:/Progs/Ruby27-x64/lib/ruby/gems/2.7.0/gems/arduino_ci-1.1.0/lib/arduino_ci/host.rb:106:in `match': invalid byte sequence in 
UTF-8 (ArgumentError)

Note that everything is ok when I run it when the symlink in the Arduino libraries folder doesn't exists.

After some internet research I solved it but replacing the line (host.rb:106) :

- symlinks = stdout.lines.map { |l| DIR_SYMLINK_REGEX.match(l) }.compact
+ symlinks = stdout.lines.map { |l| DIR_SYMLINK_REGEX.match(l.scrub) }.compact

As I don't know Ruby or your code I have no clue on the consequences of this change but I guess it may be a good start for experts to solve this :)

I wish you a good day !

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't workingci scriptsThe test runner scriptsThe test runner scripts

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.