Paperspace / DinoRunTutorial

Accompanying code for Paperspace tutorial "Build an AI to play Dino Run"
https://blog.paperspace.com/dino-run
MIT License
323 stars 104 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'objects/D.pkl' #6

Closed tkgmomosheep closed 5 years ago

tkgmomosheep commented 5 years ago

I am experiencing the above the error when I run the command, I copied the objects folder to the directory already. I am running it on windows 10 and the chrome browser did pop up and the game started but in the command prompt shows the error below.

`C:\Users\Tom\Desktop\Chrome-Dino-Reinforcement-Learning-master\DinoRunTutorial-master>jupyter nbconvert --execute "Reinforcement Learning Dino Run.ipynb" [NbConvertApp] Converting notebook Reinforcement Learning Dino Run.ipynb to html [NbConvertApp] Executing notebook with kernel: python3

DevTools listening on ws://127.0.0.1:64177/devtools/browser/b0ad5ad8-8ca7-44f6-a4fa-7a1de1a2553e [NbConvertApp] ERROR | Error while converting 'Reinforcement Learning Dino Run.ipynb' Traceback (most recent call last): File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\nbconvertapp.py", line 407, in export_single_notebook output, resources = self.exporter.from_filename(notebook_filename, resources=resources) File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\exporters\exporter.py", line 178, in from_filename return self.from_file(f, resources=resources, kw) File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\exporters\exporter.py", line 196, in from_file return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, kw) File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\exporters\html.py", line 95, in from_notebook_node output, resources = super(HTMLExporter, self).from_notebook_node(nb, resources, kw) File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\exporters\templateexporter.py", line 300, in from_notebook_node nb_copy, resources = super(TemplateExporter, self).from_notebook_node(nb, resources, kw) File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\exporters\exporter.py", line 138, in from_notebook_node nb_copy, resources = self._preprocess(nb_copy, resources) File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\exporters\exporter.py", line 315, in _preprocess nbc, resc = preprocessor(nbc, resc) File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\preprocessors\base.py", line 47, in call return self.preprocess(nb, resources) File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\preprocessors\execute.py", line 361, in preprocess nb, resources = super(ExecutePreprocessor, self).preprocess(nb, resources) File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\preprocessors\base.py", line 69, in preprocess nb.cells[index], resources = self.preprocess_cell(cell, resources, index) File "c:\users\tom\appdata\local\programs\python\python36\lib\site-packages\nbconvert\preprocessors\execute.py", line 385, in preprocess_cell raise CellExecutionError.from_cell_and_msg(cell, out) nbconvert.preprocessors.execute.CellExecutionError: An error occurred while executing the following cell:

playGame(observe=False);

--------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last)  in  ----> 1 playGame(observe=False);   in playGame(observe)  6 model = buildmodel()  7 try: ----> 8 trainNetwork(model,game_state,observe=observe)  9 except StopIteration:  10 game.end()

 in trainNetwork(model, game_state, observe)  9 last_time = time.time()  10 # store the previous observations in replay memory ---> 11 D = load_obj("D") #load from file system  12 # get the first state by doing nothing  13 do_nothing = np.zeros(ACTIONS)

 in load_obj(name)  3 pickle.dump(obj, f, pickle.HIGHEST_PROTOCOL)  4 def load_obj(name ): ----> 5 with open('objects/' + name + '.pkl', 'rb') as f:  6 return pickle.load(f)  7 

FileNotFoundError: [Errno 2] No such file or directory: 'objects/D.pkl' FileNotFoundError: [Errno 2] No such file or directory: 'objects/D.pkl'`

ravi72munde commented 5 years ago

I'm guessing it has objects folder missing. https://github.com/Paperspace/DinoRunTutorial/issues/5

I've updated the repo with a dummy file structure