For anyone else encountering this error when running the vocab_intersection.py, it looks like there is an issue with the config.json in transfo-xl-wt103 directory.
Update the config.json to the JSON in the link below and it should resolve the error.
https://huggingface.co/transfo-xl/transfo-xl-wt103/raw/50554b1a7e440d988096dbdf0b3a0edc73470d3d/config.json
Hope this helps!