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

invalid start byte #3698

Closed
Sunny-Day200 opened this issue Apr 29, 2020 · 12 comments
Closed

invalid start byte #3698

Sunny-Day200 opened this issue Apr 29, 2020 · 12 comments
Labels
awaiting response we are waiting for your reply, please respond! :)

Comments

@Sunny-Day200
Copy link

windows 10
dvc-0.92.0
git-bash 2.26.2.1

This is a very clean system
I cannot perform any DVC operations
Could it be because of the system environment?


ERROR: unexpected error - 'utf-8' codec can't decode byte 0x87 in position 0: invalid start byte

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
Traceback (most recent call last):
File "dvc_main_.py", line 7, in
File "dvc\main.py", line 90, in main
File "dvc\analytics.py", line 58, in is_enabled
File "dvc\config.py", line 235, in init
File "dvc\config.py", line 284, in load
File "dvc\config.py", line 297, in load_one
File "dvc\config.py", line 357, in _load_config
File "site-packages\configobj.py", line 1229, in init
File "site-packages\configobj.py", line 1287, in _load
File "site-packages\configobj.py", line 1485, in _handle_bom
File "site-packages\configobj.py", line 1517, in _decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x87 in position 0: invalid start byte
[30444] Failed to execute script main
[0x7FFD3CAFD3F0] ANOMALY: meaningless REX prefix used


And I want to ask about the cache link type, does it control the 'remote repository' and 'local cache' links?Or does it only work on 'local cache' links, and if it only works on 'local cache' links, can I change the 'DVC cache type, controlling the link type of the local cache data every time I pull git repository from a different platform?My English is not very good, I am not sure if I describe clearly, can you understand?

@triage-new-issues triage-new-issues bot added the triage Needs to be triaged label Apr 29, 2020
@efiop
Copy link
Contributor

efiop commented Apr 29, 2020

Hi @Sunny-Day200 !

Please show us $ dvc version output (it contains more than a version).

Correct, cache link type only controls local cache links. 🙂

can I change the 'DVC cache type, controlling the link type of the local cache data every time I pull git repository from a different platform

Yes, you could use .dvc/config.local(used when you specify --local flag in your dvc config commands) for that. It is not tracked by git so it just stays in your local git repo instance.

@efiop efiop added the awaiting response we are waiting for your reply, please respond! :) label Apr 29, 2020
@triage-new-issues triage-new-issues bot removed the triage Needs to be triaged label Apr 29, 2020
@Sunny-Day200
Copy link
Author

Thanked your reply
I tried it, but it didn't make any difference, right

$ dvc version
ERROR: unexpected error - 'utf-8' codec can't decode byte 0x87 in position 0: invalid start byte

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
Traceback (most recent call last):
File "dvc_main_.py", line 7, in
File "dvc\main.py", line 90, in main
File "dvc\analytics.py", line 58, in is_enabled
File "dvc\config.py", line 235, in init
File "dvc\config.py", line 284, in load
File "dvc\config.py", line 297, in load_one
File "dvc\config.py", line 357, in _load_config
File "site-packages\configobj.py", line 1229, in init
File "site-packages\configobj.py", line 1287, in _load
File "site-packages\configobj.py", line 1485, in _handle_bom
File "site-packages\configobj.py", line 1517, in _decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x87 in position 0: invalid start byte
[28480] Failed to execute script main
[0x7FFD3CAFD3F0] ANOMALY: meaningless REX prefix used

@karajan1001
Copy link
Contributor

karajan1001 commented Apr 29, 2020

I think this is because your system uses a different encoding method (for example Chinese character may encode into gbk not utf-8 ). Do you use a pathname with some non-English character in it? If so, cleaning any non-English char in your pathname might solve your problem. But it's only a temporary solution, not a final one.

def _load_config(filename):
    conf_obj = configobj.ConfigObj(filename)
    return _parse_remotes(_lower_keys(conf_obj.dict()))

@karajan1001
Copy link
Contributor

karajan1001 commented May 1, 2020

image
I can't reproduce your error. It seems that UTF8 encoding had been set to default since Windows 10 version 1903. Could you give me the result from the following python script?

import sys
print(sys.getfilesystemencoding())

@Sunny-Day200
Copy link
Author

图片
我无法重现您的错误。自Windows 10 1903版以来,似乎UTF8编码已设置为默认值。您能否从以下python脚本中获取结果?

import sys
print(sys.getfilesystemencoding())

It is indeed in utf-8 format. I haven't figured out what the problem is yet. It didn't happen on my other computers.I'm going to reinstall the system and try again

@karajan1001
Copy link
Contributor

图片
我无法重现您的错误。自Windows 10 1903版以来,似乎UTF8编码已设置为默认值。您能否从以下python脚本中获取结果?

import sys
print(sys.getfilesystemencoding())

It is indeed in utf-8 format. I haven't figured out what the problem is yet. It didn't happen on my other computers.I'm going to reinstall the system and try again

Have you tried using a folder name without any non-English characters?

@Sunny-Day200
Copy link
Author

图片
自Windows 10 1903版以来,似乎UTF8编码已设置为替换值。您能否从以下python脚本中获取结果?

import sys
print(sys.getfilesystemencoding())

它确实是utf-8格式。我还没有弄清楚问题出在哪里。在其他计算机上没有发生。我要重新安装系统,然后重试

您是否尝试使用没有任何非英文字符的文件夹名称?

The path does not contain any non-english characters
b473e7df0fdfda76006986ed487f3ed

@Sunny-Day200
Copy link
Author

I have some other questions

As described in the documentation, the hardlink, symlink link types make the workspace trace data file read-only (this prevents the user from accidentally corrupting the cache by modifying the file link).
As mentioned above, if I locally clone git from a remote location and change the copy of the cache link type to a symbolic link, is the trace file".dvc file" still not protected, and ".dvc file" will become read-only only after rebuilding "DVC add"
Sorry, I seem a little confused

@efiop
Copy link
Contributor

efiop commented May 7, 2020

@Sunny-Day200 That is expected behaviour. What is important is that the cache file in .dvc/cache stays read-only and is not corrupted. dvc add will create a new cache entry for a modified file and will link it as read-only back into your workspace.

@karajan1001
Copy link
Contributor

I have some other questions

As described in the documentation, the hardlink, symlink link types make the workspace trace data file read-only (this prevents the user from accidentally corrupting the cache by modifying the file link).
As mentioned above, if I locally clone git from a remote location and change the copy of the cache link type to a symbolic link, is the trace file".dvc file" still not protected, and ".dvc file" will become read-only only after rebuilding "DVC add"
Sorry, I seem a little confused

Thank you, so strange. Maybe there is non-English char in your user name? And the error raises from loading global configuration.

@Sunny-Day200
Copy link
Author

I have some other questions

As described in the documentation, the hardlink, symlink link types make the workspace trace data file read-only (this prevents the user from accidentally corrupting the cache by modifying the file link).
As mentioned above, if I locally clone git from a remote location and change the copy of the cache link type to a symbolic link, is the trace file".dvc file" still not protected, and ".dvc file" will become read-only only after rebuilding "DVC add"
Sorry, I seem a little confused

Thank you, so strange. Maybe there is non-English char in your user name? And the error raises from loading global configuration.

No , so I'm confused

@efiop
Copy link
Contributor

efiop commented Jun 3, 2020

Not able to reproduce :( Closing for now.

@Sunny-Day200 were you able to work around this issue?

@efiop efiop closed this as completed Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response we are waiting for your reply, please respond! :)
Projects
None yet
Development

No branches or pull requests

3 participants