[pyg TUDataset] TypeError: LocalFileSystem.mv() takes 3 positional arguments but 4 were given

メモ程度にまとめたので、よければ参考にしてください。

# 1. TypeError: LocalFileSystem.mv() takes 3 positional arguments but 4 were given

```load_TUDataset.py
from torch_geometric.datasets import TUDataset

dataset = TUDataset(root="./", name="MUTAG")

for i in dataset:
    print(i)
```

```
$ python load_TUDataset.py

File "/load_TUDataset.py", line 3, in <module>
    dataset = TUDataset(root="./", name="MUTAG")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.
.
.

File "/torch_geometric/io/fs.py", line 193, in mv
    fs1.mv(path1, path2, recursive)
TypeError: LocalFileSystem.mv() takes 3 positional arguments but 4 were given
```

## 1-1. 修正方法

```/torch_geometric/io/fs.py
def mv(path1: str, path2: str, recursive: bool = True) -> None:
    fs1 = get_fs(path1)
    fs2 = get_fs(path2)
    assert fs1.protocol == fs2.protocol
    # fs1.mv(path1, path2, recursive)     ←3つ目の引数を削除する
    fs1.mv(path1, path2)
```

```
$ python load_TUDataset.py

Downloading https://www.chrsmrrs.com/graphkerneldatasets/MUTAG.zip
Processing...
Done!
```

## 1-2. 再読み込みしてみる

```load_TUDataset.py
from torch_geometric.datasets import TUDataset

dataset = TUDataset(root="./", name="MUTAG")

for i in dataset:
    print(i)
```

<details><summary>コンソール画面</summary><div>

```
$ python load_TUDataset.py

Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 28], x=[13, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 28], x=[13, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 44], x=[19, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 22], x=[11, 7], edge_attr=[22, 4], y=[1])
Data(edge_index=[2, 62], x=[28, 7], edge_attr=[62, 4], y=[1])
Data(edge_index=[2, 34], x=[16, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 44], x=[20, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 26], x=[12, 7], edge_attr=[26, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 46], x=[20, 7], edge_attr=[46, 4], y=[1])
Data(edge_index=[2, 50], x=[22, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 28], x=[13, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 44], x=[19, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 50], x=[22, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 22], x=[11, 7], edge_attr=[22, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 28], x=[13, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 40], x=[18, 7], edge_attr=[40, 4], y=[1])
Data(edge_index=[2, 38], x=[18, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 54], x=[23, 7], edge_attr=[54, 4], y=[1])
Data(edge_index=[2, 66], x=[27, 7], edge_attr=[66, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 26], x=[13, 7], edge_attr=[26, 4], y=[1])
Data(edge_index=[2, 54], x=[23, 7], edge_attr=[54, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 50], x=[23, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 54], x=[23, 7], edge_attr=[54, 4], y=[1])
Data(edge_index=[2, 50], x=[22, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 50], x=[24, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 50], x=[23, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 28], x=[13, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 30], x=[14, 7], edge_attr=[30, 4], y=[1])
Data(edge_index=[2, 36], x=[17, 7], edge_attr=[36, 4], y=[1])
Data(edge_index=[2, 32], x=[15, 7], edge_attr=[32, 4], y=[1])
Data(edge_index=[2, 32], x=[15, 7], edge_attr=[32, 4], y=[1])
Data(edge_index=[2, 28], x=[13, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 28], x=[13, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 44], x=[19, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 24], x=[12, 7], edge_attr=[24, 4], y=[1])
Data(edge_index=[2, 54], x=[23, 7], edge_attr=[54, 4], y=[1])
Data(edge_index=[2, 50], x=[22, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 44], x=[20, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 34], x=[16, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 60], x=[26, 7], edge_attr=[60, 4], y=[1])
Data(edge_index=[2, 60], x=[26, 7], edge_attr=[60, 4], y=[1])
Data(edge_index=[2, 42], x=[19, 7], edge_attr=[42, 4], y=[1])
Data(edge_index=[2, 42], x=[19, 7], edge_attr=[42, 4], y=[1])
Data(edge_index=[2, 30], x=[14, 7], edge_attr=[30, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 44], x=[21, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 58], x=[25, 7], edge_attr=[58, 4], y=[1])
Data(edge_index=[2, 54], x=[23, 7], edge_attr=[54, 4], y=[1])
Data(edge_index=[2, 40], x=[19, 7], edge_attr=[40, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 22], x=[11, 7], edge_attr=[22, 4], y=[1])
Data(edge_index=[2, 48], x=[23, 7], edge_attr=[48, 4], y=[1])
Data(edge_index=[2, 44], x=[20, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 34], x=[16, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 34], x=[16, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 46], x=[20, 7], edge_attr=[46, 4], y=[1])
Data(edge_index=[2, 54], x=[23, 7], edge_attr=[54, 4], y=[1])
Data(edge_index=[2, 42], x=[19, 7], edge_attr=[42, 4], y=[1])
Data(edge_index=[2, 30], x=[14, 7], edge_attr=[30, 4], y=[1])
Data(edge_index=[2, 60], x=[26, 7], edge_attr=[60, 4], y=[1])
Data(edge_index=[2, 36], x=[16, 7], edge_attr=[36, 4], y=[1])
Data(edge_index=[2, 34], x=[16, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 54], x=[23, 7], edge_attr=[54, 4], y=[1])
Data(edge_index=[2, 38], x=[18, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 20], x=[10, 7], edge_attr=[20, 4], y=[1])
Data(edge_index=[2, 34], x=[16, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 34], x=[16, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 44], x=[19, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 24], x=[12, 7], edge_attr=[24, 4], y=[1])
Data(edge_index=[2, 56], x=[25, 7], edge_attr=[56, 4], y=[1])
Data(edge_index=[2, 36], x=[16, 7], edge_attr=[36, 4], y=[1])
Data(edge_index=[2, 22], x=[11, 7], edge_attr=[22, 4], y=[1])
Data(edge_index=[2, 54], x=[23, 7], edge_attr=[54, 4], y=[1])
Data(edge_index=[2, 54], x=[23, 7], edge_attr=[54, 4], y=[1])
Data(edge_index=[2, 36], x=[16, 7], edge_attr=[36, 4], y=[1])
Data(edge_index=[2, 24], x=[12, 7], edge_attr=[24, 4], y=[1])
Data(edge_index=[2, 28], x=[13, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 54], x=[23, 7], edge_attr=[54, 4], y=[1])
Data(edge_index=[2, 58], x=[25, 7], edge_attr=[58, 4], y=[1])
Data(edge_index=[2, 44], x=[19, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 54], x=[23, 7], edge_attr=[54, 4], y=[1])
Data(edge_index=[2, 44], x=[19, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 40], x=[19, 7], edge_attr=[40, 4], y=[1])
Data(edge_index=[2, 56], x=[25, 7], edge_attr=[56, 4], y=[1])
Data(edge_index=[2, 40], x=[18, 7], edge_attr=[40, 4], y=[1])
Data(edge_index=[2, 28], x=[13, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 34], x=[15, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 34], x=[16, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 54], x=[23, 7], edge_attr=[54, 4], y=[1])
Data(edge_index=[2, 56], x=[26, 7], edge_attr=[56, 4], y=[1])
Data(edge_index=[2, 44], x=[19, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 54], x=[23, 7], edge_attr=[54, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 46], x=[20, 7], edge_attr=[46, 4], y=[1])
Data(edge_index=[2, 56], x=[25, 7], edge_attr=[56, 4], y=[1])
Data(edge_index=[2, 44], x=[19, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 66], x=[28, 7], edge_attr=[66, 4], y=[1])
Data(edge_index=[2, 50], x=[24, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 22], x=[11, 7], edge_attr=[22, 4], y=[1])
Data(edge_index=[2, 34], x=[15, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 26], x=[13, 7], edge_attr=[26, 4], y=[1])
Data(edge_index=[2, 34], x=[16, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 26], x=[12, 7], edge_attr=[26, 4], y=[1])
Data(edge_index=[2, 20], x=[10, 7], edge_attr=[20, 4], y=[1])
Data(edge_index=[2, 44], x=[21, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 54], x=[23, 7], edge_attr=[54, 4], y=[1])
Data(edge_index=[2, 44], x=[21, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 28], x=[13, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 56], x=[25, 7], edge_attr=[56, 4], y=[1])
Data(edge_index=[2, 48], x=[21, 7], edge_attr=[48, 4], y=[1])
Data(edge_index=[2, 36], x=[17, 7], edge_attr=[36, 4], y=[1])
Data(edge_index=[2, 22], x=[11, 7], edge_attr=[22, 4], y=[1])
Data(edge_index=[2, 44], x=[19, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 44], x=[20, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 44], x=[21, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 34], x=[15, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 28], x=[14, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 22], x=[11, 7], edge_attr=[22, 4], y=[1])
Data(edge_index=[2, 40], x=[19, 7], edge_attr=[40, 4], y=[1])
Data(edge_index=[2, 22], x=[11, 7], edge_attr=[22, 4], y=[1])
Data(edge_index=[2, 46], x=[21, 7], edge_attr=[46, 4], y=[1])
Data(edge_index=[2, 50], x=[22, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 22], x=[11, 7], edge_attr=[22, 4], y=[1])
Data(edge_index=[2, 46], x=[20, 7], edge_attr=[46, 4], y=[1])
Data(edge_index=[2, 50], x=[22, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 28], x=[13, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 22], x=[11, 7], edge_attr=[22, 4], y=[1])
Data(edge_index=[2, 34], x=[16, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 22], x=[11, 7], edge_attr=[22, 4], y=[1])
Data(edge_index=[2, 44], x=[20, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 24], x=[12, 7], edge_attr=[24, 4], y=[1])
Data(edge_index=[2, 22], x=[11, 7], edge_attr=[22, 4], y=[1])
Data(edge_index=[2, 34], x=[16, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 34], x=[16, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 28], x=[13, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 34], x=[15, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 44], x=[20, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 24], x=[12, 7], edge_attr=[24, 4], y=[1])
Data(edge_index=[2, 26], x=[12, 7], edge_attr=[26, 4], y=[1])
Data(edge_index=[2, 50], x=[22, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 34], x=[15, 7], edge_attr=[34, 4], y=[1])
Data(edge_index=[2, 26], x=[12, 7], edge_attr=[26, 4], y=[1])
Data(edge_index=[2, 28], x=[14, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 26], x=[12, 7], edge_attr=[26, 4], y=[1])
Data(edge_index=[2, 46], x=[20, 7], edge_attr=[46, 4], y=[1])
Data(edge_index=[2, 44], x=[20, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 46], x=[20, 7], edge_attr=[46, 4], y=[1])
Data(edge_index=[2, 28], x=[14, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 60], x=[26, 7], edge_attr=[60, 4], y=[1])
Data(edge_index=[2, 50], x=[24, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 50], x=[22, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 50], x=[22, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 44], x=[19, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 52], x=[23, 7], edge_attr=[52, 4], y=[1])
Data(edge_index=[2, 50], x=[22, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 22], x=[11, 7], edge_attr=[22, 4], y=[1])
Data(edge_index=[2, 26], x=[13, 7], edge_attr=[26, 4], y=[1])
Data(edge_index=[2, 38], x=[17, 7], edge_attr=[38, 4], y=[1])
Data(edge_index=[2, 50], x=[24, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 26], x=[12, 7], edge_attr=[26, 4], y=[1])
Data(edge_index=[2, 44], x=[21, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 50], x=[22, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 48], x=[22, 7], edge_attr=[48, 4], y=[1])
Data(edge_index=[2, 26], x=[12, 7], edge_attr=[26, 4], y=[1])
Data(edge_index=[2, 44], x=[20, 7], edge_attr=[44, 4], y=[1])
Data(edge_index=[2, 28], x=[13, 7], edge_attr=[28, 4], y=[1])
Data(edge_index=[2, 46], x=[22, 7], edge_attr=[46, 4], y=[1])
Data(edge_index=[2, 66], x=[28, 7], edge_attr=[66, 4], y=[1])
Data(edge_index=[2, 22], x=[11, 7], edge_attr=[22, 4], y=[1])
Data(edge_index=[2, 30], x=[14, 7], edge_attr=[30, 4], y=[1])
Data(edge_index=[2, 50], x=[22, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 50], x=[22, 7], edge_attr=[50, 4], y=[1])
Data(edge_index=[2, 26], x=[13, 7], edge_attr=[26, 4], y=[1])
Data(edge_index=[2, 26], x=[12, 7], edge_attr=[26, 4], y=[1])
Data(edge_index=[2, 48], x=[21, 7], edge_attr=[48, 4], y=[1])
Data(edge_index=[2, 36], x=[16, 7], edge_attr=[36, 4], y=[1])
```

</div></details>