Skip to content

Commit 1c22a93

Browse files
authored
Update listdir() in sample code to take correct args (#2261)
Executing this code (Python 3.11, MacOS) returns error `TypeError: listdir: path should be string, bytes, os.PathLike, integer or None, not TemporaryDirectory` Using the string name of the dir works better.
1 parent 6c3d779 commit 1c22a93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

website/docs/tutorial/code-executors.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
"source": [
199199
"import os\n",
200200
"\n",
201-
"print(os.listdir(temp_dir))\n",
201+
"print(os.listdir(temp_dir.name))\n",
202202
"# We can see the output scatter.png and the code file generated by the agent."
203203
]
204204
},

0 commit comments

Comments
 (0)