Much to my surprise, upon updating to the latest version of pyvis, a 'lib' folder with JS files now gets created/updated in the working directory?!
Incidentally, all my .py files also live in a 'lib' folder within the same working directory. As such, this latest version completely DELETED all my code. I was lucky to have made a backup recently, otherwise things would have been very bad.
Unfortunately, this 'lib' folder is not bound to the HTML file save location but rather to the working directory itself, making it impossible to maintain the codebase in a 'lib' folder. This needs to be fixed ASAP, and a Warning issued beforehand!
UPDATE: The folder only gets copied over when the 'lib' folder already exists in the working directory. I assume the following is the issue here:
|
if os.path.exists("lib"): |
|
shutil.rmtree(f"lib") |
|
shutil.copytree(f"{os.path.dirname(__file__)}/templates/lib", "lib") |
Much to my surprise, upon updating to the latest version of pyvis, a 'lib' folder with JS files now gets created/updated in the working directory?!
Incidentally, all my .py files also live in a 'lib' folder within the same working directory. As such, this latest version completely DELETED all my code. I was lucky to have made a backup recently, otherwise things would have been very bad.
Unfortunately, this 'lib' folder is not bound to the HTML file save location but rather to the working directory itself, making it impossible to maintain the codebase in a 'lib' folder. This needs to be fixed ASAP, and a Warning issued beforehand!
UPDATE: The folder only gets copied over when the 'lib' folder already exists in the working directory. I assume the following is the issue here:
pyvis/pyvis/network.py
Lines 511 to 513 in f4847af