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

v5.7 with gbk issue #173

Open
forxhunter opened this issue Jan 24, 2023 · 0 comments
Open

v5.7 with gbk issue #173

forxhunter opened this issue Jan 24, 2023 · 0 comments

Comments

@forxhunter
Copy link

whe loading midas, it reports that

---------------------------------------------------------------------------
UnicodeDecodeError                        Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_3820\2090424137.py in <module>
     75 try:
---> 76     from midas.dpt_depth import DPTDepthModel
     77 except:

~\AppData\Roaming\Python\Python39\site-packages\midas\__init__.py in <module>
      7 """
----> 8 from midas.driver import GasDetector
      9 

~\AppData\Roaming\Python\Python39\site-packages\midas\driver.py in <module>
     18     reader = csv.reader(in_file)
---> 19     next(reader)
     20     faults = {row[0]: {'description': row[1], 'condition': row[2],

UnicodeDecodeError: 'gbk' codec can't decode byte 0x98 in position 2410: illegal multibyte sequence

During handling of the above exception, another exception occurred:

FileNotFoundError                         Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_3820\2090424137.py in <module>
     81         shutil.move('MiDaS/utils.py', 'MiDaS/midas_utils.py')
     82     if not os.path.exists(f'{model_path}/dpt_large-midas-2f21e586.pt'):
---> 83         wget("https://github.com/intel-isl/DPT/releases/download/1_0/dpt_large-midas-2f21e586.pt", model_path)
     84     sys.path.append(f'{PROJECT_DIR}/MiDaS')
     85 

~\AppData\Local\Temp\ipykernel_3820\3644906966.py in wget(url, outputdir)
     21 
     22 def wget(url, outputdir):
---> 23     res = subprocess.run(['wget', url, '-P', f'{outputdir}'], stdout=subprocess.PIPE).stdout.decode('utf-8')
     24     print(res)
     25 

C:\ProgramData\Anaconda3\lib\subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
    503         kwargs['stderr'] = PIPE
    504 
--> 505     with Popen(*popenargs, **kwargs) as process:
    506         try:
    507             stdout, stderr = process.communicate(input, timeout=timeout)

C:\ProgramData\Anaconda3\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, user, group, extra_groups, encoding, errors, text, umask)
    949                             encoding=encoding, errors=errors)
    950 
--> 951             self._execute_child(args, executable, preexec_fn, close_fds,
    952                                 pass_fds, cwd, env,
    953                                 startupinfo, creationflags, shell,

C:\ProgramData\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_gid, unused_gids, unused_uid, unused_umask, unused_start_new_session)
   1418             # Start the process
   1419             try:
-> 1420                 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
   1421                                          # no special security
   1422                                          None, None,

FileNotFoundError: [WinError 2] 系统找不到指定的文件。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant