Skip to content

Commit

Permalink
Update listdir() in sample code to take correct args (#2261)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
benstein authored Apr 3, 2024
1 parent 6c3d779 commit 1c22a93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/tutorial/code-executors.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"source": [
"import os\n",
"\n",
"print(os.listdir(temp_dir))\n",
"print(os.listdir(temp_dir.name))\n",
"# We can see the output scatter.png and the code file generated by the agent."
]
},
Expand Down

0 comments on commit 1c22a93

Please sign in to comment.