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.
This commit is contained in:
Benjamin Stein 2024-04-02 19:33:27 -07:00 committed by GitHub
parent 6c3d779e99
commit 1c22a93535
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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."
]
},