Search code examples
pythonpython-3.xgoogle-colaboratory

Errno 22 Invalid argument: python colab os.mkdir


path = '/gdrive/My Drive/test/(CXX) [グレートキャニオン (ディープバレー)] [航戦一航戦と種付け演習♪~赤城さんと加賀さんの航戦な船体目掛けてキモオタ珍宝急降下爆撃&航戦魚雷で航戦撃チン♪航戦任務航戦セリ~(艦隊これくしょん -艦これ-)][中国翻訳](98955)'

os.mkdir(path)

error

OSError: [Errno 22] Invalid argument: '/gdrive/My Drive/test/(CXX) [グレートキャニオン (ディープバレー)] [航戦一航戦と種付け演習♪~赤城さんと加賀さんの航戦な船体目掛けてキモオタ珍宝急降下爆撃&航戦魚雷で航戦撃チン♪航戦任務航戦セリ~(艦隊これくしょん -艦これ-)][中国翻訳](98955)'

I can create this folder directly on the hard drive.

But colab cannot.


Solution

  • It seems that colab is not allowed to create such names in the first place.