# Colab file reading issues

**URL:** <https://forum.freecodecamp.org/t/colab-file-reading-issues/612602>\
**Category:** General\
**Created:** [May 28, 2023, 3:40am UTC](https://forum.freecodecamp.org/t/colab-file-reading-issues/612602 "2023-05-28T03:40:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![farrukhazfar](https://avatars.discourse-cdn.com/v4/letter/f/e495f1/32.png) [@farrukhazfar](https://forum.freecodecamp.org/u/farrukhazfar)\
**Post date:** [May 28, 2023, 3:40am UTC](https://forum.freecodecamp.org/t/colab-file-reading-issues/612602/1 "2023-05-28T03:40:17Z")

</div>

Dear Folks - I am having trouble accessing files in colab after succesfully mounting my google drive

All of the following work :  
**drive.mount(‘/content/gdrive’, force\_remount=True)**  
**%cd gdrive/MyDrive**  
**%ls TriangulationSimulation\ SNOP**  
**file1 = ‘TriangulationSimulation\ SNOP/nlog-dump-SNOP-json-950-0.json’**  
**%cat $file1**

However I next try to open the very same file (file1) which is a json file :

**fsnop = open(file1)**  
(or **fsnop = open(file1, “r”)**)

and I get an error : **'FileNotFoundError: [Errno 2] No such file or directory: ‘TriangulationSimulation\ SNOP/nlog-dump-SNOP-json-950-0.json’**

My next step will be to load the json data by doing json.load(fsnop)

This works when I run it in python on my laptop so I’ve no idea whats going on.

Farrukh

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [November 26, 2023, 3:40pm UTC](https://forum.freecodecamp.org/t/colab-file-reading-issues/612602/2 "2023-11-26T15:40:44Z")

</div>

Closed on November 26, 2023, 3:40pm UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
