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

Please advise how to solve this error #160

Open
myrisc opened this issue Sep 30, 2022 · 0 comments
Open

Please advise how to solve this error #160

myrisc opened this issue Sep 30, 2022 · 0 comments

Comments

@myrisc
Copy link

myrisc commented Sep 30, 2022

UnicodeDecodeError Traceback (most recent call last)
Input In [5], in <cell line: 75>()
75 try:
---> 76 from midas.dpt_depth import DPTDepthModel
77 except:

File C:\ProgramData\Anaconda3\lib\site-packages\midas_init_.py:8, in
2 """
3 A Python driver for Honeywell's Midas gas detector, using TCP/IP modbus.
4
5 Distributed under the GNU General Public License v2
6 Copyright (C) 2019 NuMat Technologies
7 """
----> 8 from midas.driver import GasDetector
11 def command_line():

File C:\ProgramData\Anaconda3\lib\site-packages\midas\driver.py:19, in
18 reader = csv.reader(in_file)
---> 19 next(reader)
20 faults = {row[0]: {'description': row[1], 'condition': row[2],
21 'recovery': row[3]} for row in reader}

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)
Input In [5], in <cell line: 75>()
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')
86 try:

Input In [2], in wget(url, outputdir)
19 def wget(url, outputdir):
---> 20 res = subprocess.run(['wget', url, '-P', f'{outputdir}'], stdout=subprocess.PIPE).stdout.decode('utf-8')
21 print(res)

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

File C:\ProgramData\Anaconda3\lib\subprocess.py:951, in Popen.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)
947 if self.text_mode:
948 self.stderr = io.TextIOWrapper(self.stderr,
949 encoding=encoding, errors=errors)
--> 951 self._execute_child(args, executable, preexec_fn, close_fds,
952 pass_fds, cwd, env,
953 startupinfo, creationflags, shell,
954 p2cread, p2cwrite,
955 c2pread, c2pwrite,
956 errread, errwrite,
957 restore_signals,
958 gid, gids, uid, umask,
959 start_new_session)
960 except:
961 # Cleanup if the child failed starting.
962 for f in filter(None, (self.stdin, self.stdout, self.stderr)):

File C:\ProgramData\Anaconda3\lib\subprocess.py:1420, in Popen._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,
1423 int(not close_fds),
1424 creationflags,
1425 env,
1426 cwd,
1427 startupinfo)
1428 finally:
1429 # Child is launched. Close the parent's copy of those pipe
1430 # handles that only the child should have open. You need
(...)
1433 # pipe will not close when the child process exits and the
1434 # ReadFile will hang.
1435 self._close_pipe_fds(p2cread, p2cwrite,
1436 c2pread, c2pwrite,
1437 errread, errwrite)

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