diff --git a/.notebook/espnet_dataloader.ipynb b/.notebook/espnet_dataloader.ipynb index 12870a8ebb75137a52358bc6a73806d563f1cdf2..7abb138ffc97db96ba5e7ff5af2754d19ba97d2c 100644 --- a/.notebook/espnet_dataloader.ipynb +++ b/.notebook/espnet_dataloader.ipynb @@ -1058,7 +1058,7 @@ { "cell_type": "code", "execution_count": 34, - "id": "7f0307eb", + "id": "502d3f4d", "metadata": {}, "outputs": [ { @@ -1186,7 +1186,7 @@ { "cell_type": "code", "execution_count": 84, - "id": "1b6508fc", + "id": "0b92ade5", "metadata": {}, "outputs": [], "source": [ @@ -1196,7 +1196,7 @@ { "cell_type": "code", "execution_count": 85, - "id": "25d655c0", + "id": "8dbd847c", "metadata": {}, "outputs": [], "source": [ @@ -1206,7 +1206,7 @@ { "cell_type": "code", "execution_count": 87, - "id": "a28e5141", + "id": "31c085f4", "metadata": {}, "outputs": [ { @@ -1300,10 +1300,44 @@ "print(olen.dtype)" ] }, + { + "cell_type": "code", + "execution_count": 88, + "id": "72e9ba60", + "metadata": {}, + "outputs": [], + "source": [ + "from pathlib import Path" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "id": "64593e5f", + "metadata": {}, + "outputs": [ + { + "ename": "AttributeError", + "evalue": "'str' object has no attribute 'stat'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m/tmp/ipykernel_48616/3505477735.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0ms\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'xxxxxxxx'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mPath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_file\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m/usr/local/lib/python3.7/pathlib.py\u001b[0m in \u001b[0;36mis_file\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1342\u001b[0m \"\"\"\n\u001b[1;32m 1343\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1344\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mS_ISREG\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mst_mode\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1345\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mOSError\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1346\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0merrno\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32min\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mENOENT\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mENOTDIR\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mAttributeError\u001b[0m: 'str' object has no attribute 'stat'" + ] + } + ], + "source": [ + "s='xxxxxxxx'\n", + "Path.is_file(s)" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "1d981df4", + "id": "fcea3fd0", "metadata": {}, "outputs": [], "source": []