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

FileNotFoundError #43

Closed
sharpwood opened this issue Mar 30, 2018 · 4 comments
Closed

FileNotFoundError #43

sharpwood opened this issue Mar 30, 2018 · 4 comments

Comments

@sharpwood
Copy link

Use this template when reporting bugs, errors or unexpected behaviour.
Override for general questions, feature requests, proposals etc.

Running environment:

Manjaro Linux Anaconda 5.1 Python 3.6
Jupyter Notebook

Files or part of package has been run:

atari_a3c

screenshot_20180330_160344

@Kismuz
Copy link
Owner

Kismuz commented Mar 31, 2018

@sharpwood, thanks for pointing that out; corrected, update, should run ok.

@sharpwood
Copy link
Author

Unfortunately, I updated and reinstalled it, but I still had that mistake.

[2018-03-31 10:55:34.071209] INFO: LauncherShell: Random seed: 0
</home/liguodong/tmp/test_gym_a3c> already exists. Override[y/n]? y
[2018-03-31 10:55:39.373812] NOTICE: LauncherShell: Files in </home/liguodong/tmp/test_gym_a3c> purged.


FileNotFoundError Traceback (most recent call last)
in ()
43 root_random_seed=0,
44 purge_previous=1, # ask to override previously saved model and logs
---> 45 verbose=1
46 )

~/Code/btgym-master/btgym/algorithms/launcher/base.py in init(self, env_config, cluster_config, policy_config, trainer_config, max_env_steps, root_random_seed, test_mode, purge_previous, log_level, verbose)
183
184 # Make cluster specification dict:
--> 185 self.cluster_spec = self.make_cluster_spec(self.cluster_config)
186
187 # Configure workers:

~/Code/btgym-master/btgym/algorithms/launcher/base.py in make_cluster_spec(self, config)
260
261 for _ in range(config['num_ps']):
--> 262 self.clear_port(port)
263 self.ports_to_use.append(port)
264 all_ps.append('{}:{}'.format(config['host'], port))

~/Code/btgym-master/btgym/algorithms/launcher/base.py in clear_port(self, port_list)
283
284 for port in port_list:
--> 285 p = psutil.Popen(['lsof', '-i:{}'.format(port), '-t'], stdout=PIPE, stderr=PIPE)
286 pid = p.communicate()[0].decode()[:-1] # retrieving PID
287 if pid is not '':

/opt/anaconda/lib/python3.6/site-packages/psutil/init.py in init(self, *args, **kwargs)
1309 # spawned by subprocess.Popen terminates too quickly, see:
1310 # giampaolo/psutil#193
-> 1311 self.__subproc = subprocess.Popen(*args, **kwargs)
1312 self._init(self.__subproc.pid, _ignore_nsp=True)
1313

/opt/anaconda/lib/python3.6/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, encoding, errors)
707 c2pread, c2pwrite,
708 errread, errwrite,
--> 709 restore_signals, start_new_session)
710 except:
711 # Cleanup if the child failed starting.

/opt/anaconda/lib/python3.6/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, restore_signals, start_new_session)
1342 if errno_num == errno.ENOENT:
1343 err_msg += ': ' + repr(err_filename)
-> 1344 raise child_exception_type(errno_num, err_msg, err_filename)
1345 raise child_exception_type(err_msg)
1346

FileNotFoundError: [Errno 2] No such file or directory: 'lsof': 'lsof'

@Kismuz
Copy link
Owner

Kismuz commented Mar 31, 2018

Hmm, @sharpwood do you have lsof utility installed?

@sharpwood
Copy link
Author

I install lsof and it works. Thanks mate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants