Skip to content
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

Library keeps reinstalling for non-latin paths #1252

Closed
me21 opened this issue Dec 20, 2017 · 4 comments

Comments

2 participants
@me21
Copy link

commented Dec 20, 2017

Configuration

OS: Windows 7 SP1 x64 Russian

PlatformIO Version (platformio --version): 3.5.0rc14

Description of problem

I've created a simple project which uses ESP Async Webserver library. On every build, it keeps reinstalling the library, even though it is already installed.

It complains about some conversion error:

C:\.platformio\packages\tool-scons\script\..\engine\SCons\Environment.py:1303: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as be
ing unequal
val = [x for x in val if x not in dk]

Moving the project to the path which doesn't contain cyrillic letters fixed it for me.

Steps to Reproduce

  1. Create the project with non-latin folder path.
  2. Build it.
  3. Notice the warning (it is present even when no libraries are mentioned in platformio.ini).

@ivankravets ivankravets added this to the 3.5.0 milestone Dec 22, 2017

@ivankravets ivankravets added the lib label Dec 26, 2017

@ivankravets ivankravets modified the milestones: 3.5.0, 3.5.1 Dec 28, 2017

@ivankravets ivankravets added bug and removed help wanted labels Dec 28, 2017

@ivankravets ivankravets reopened this Dec 28, 2017

@ivankravets ivankravets modified the milestones: 3.5.0, 3.5.1 Dec 28, 2017

@ivankravets

This comment has been minimized.

Copy link
Member

commented Dec 28, 2017

TODO: Replace manifest['__pkg_dir'] = util.path_to_unicode(pkg_dir) with manifest['__pkg_dir'] = pkg_dir.

@ivankravets ivankravets modified the milestones: 3.5.1, 3.5.2 Jan 17, 2018

@ivankravets ivankravets modified the milestones: 3.5.2, 3.5.x Feb 8, 2018

@me21

This comment has been minimized.

Copy link
Author

commented May 26, 2018

@ivankravets Sometimes library manager even fails to reinstall the library. As a consequence, the build fails.

LibraryManager: Installing id=136
Error: Traceback (most recent call last):
File "c:.platformio\penv\lib\site-packages\platformio_main_.py", line 120, in main
cli(None, None, None)
File "c:.platformio\penv\lib\site-packages\click\core.py", line 700, in call
return self.main(*args, **kwargs)
File "c:.platformio\penv\lib\site-packages\click\core.py", line 680, in main
rv = self.invoke(ctx)
File "c:.platformio\penv\lib\site-packages\click\core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:.platformio\penv\lib\site-packages\click\core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:.platformio\penv\lib\site-packages\click\core.py", line 508, in invoke
return callback(*args, **kwargs)
File "c:.platformio\penv\lib\site-packages\click\decorators.py", line 16, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:.platformio\penv\lib\site-packages\platformio\commands\run.py", line 108, in cli
result = (envname, ep.process())
File "c:.platformio\penv\lib\site-packages\platformio\commands\run.py", line 207, in process
result = self._run()
File "c:.platformio\penv\lib\site-packages\platformio\commands\run.py", line 302, in _run
self.verbose)
File "c:.platformio\penv\lib\site-packages\platformio\commands\run.py", line 325, in _autoinstall_libdeps
ctx.invoke(cmd_lib_install, libraries=[lib], silent=not verbose)
File "c:.platformio\penv\lib\site-packages\click\core.py", line 508, in invoke
return callback(*args, **kwargs)
File "c:.platformio\penv\lib\site-packages\click\decorators.py", line 26, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "c:.platformio\penv\lib\site-packages\platformio\commands\lib.py", line 103, in lib_install
library, silent=silent, interactive=interactive, force=force)
File "c:.platformio\penv\lib\site-packages\platformio\managers\lib.py", line 354, in install
force=force)
File "c:.platformio\penv\lib\site-packages\platformio\managers\package.py", line 694, in install
pkg_dir = self._install_from_piorepo(name, requirements)
File "c:.platformio\penv\lib\site-packages\platformio\managers\lib.py", line 213, in _install_from_piorepo
dl_data['url'], requirements)
File "c:.platformio\penv\lib\site-packages\platformio\managers\package.py", line 421, in _install_from_url
dlpath = self.download(url, tmp_dir, sha1)
File "c:.platformio\penv\lib\site-packages\platformio\managers\package.py", line 176, in download
dst_path = join(dest_dir, fname)
File "c:.platformio\penv\lib\ntpath.py", line 85, in join
result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc7 in position 7: ordinal not in range(128)

============================================================

An unexpected error occurred. Further steps:

============================================================

@ivankravets

This comment has been minimized.

Copy link
Member

commented May 26, 2018

See temporary solution http://docs.platformio.org/en/latest/faq.html#unicodedecodeerror-non-ascii-characters-found-in-build-environment

You can set PLATFORMIO_HOME_DIR environment variable to C:\.platformio and avoid non-ascii chars in project path.

I'll look into this issue soon.

@ivankravets ivankravets modified the milestones: 3.5.x, 3.6.0 Jun 2, 2018

@ivankravets ivankravets modified the milestones: 4.0, Backlog Aug 2, 2018

@ivankravets ivankravets modified the milestones: Backlog, 4.0 May 23, 2019

@ivankravets ivankravets added this to In progress in PlatformIO 4.0 May 24, 2019

@ivankravets ivankravets moved this from In progress to Bugs in PlatformIO 4.0 May 24, 2019

@ivankravets ivankravets added this to Needs triage in Known Issues May 30, 2019

@ivankravets ivankravets moved this from Needs triage to High priority in Known Issues May 30, 2019

@ivankravets ivankravets removed this from Bugs in PlatformIO 4.0 May 30, 2019

@ivankravets ivankravets removed this from High priority in Known Issues Jun 3, 2019

@ivankravets ivankravets added this to In progress in PlatformIO 4.0 Jun 5, 2019

PlatformIO 4.0 automation moved this from In progress to Done Jun 5, 2019

@ivankravets

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

Please open PlatformIO IDE Terminal and type

pio upgrade --dev
pio update

Restart VSCode. Does it work now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.