mindstorm38 / portablemc

A fast, reliable and cross-platform command-line Minecraft launcher and API for developers. Including fast and easy installation of common mod loaders such as Fabric, Forge, NeoForge and Quilt.
https://pypi.org/project/portablemc/
GNU General Public License v3.0
372 stars 20 forks source link

Having trouble installing a version. Again :( #227

Closed AinRyzen closed 4 months ago

AinRyzen commented 4 months ago

here is my example import customtkinter as ctk import threading import portablemc.standard import pathlib def launch(): def threadlaunch(): context=portablemc.standard.Context(main_dir=pathlib.Path("maintesting"),work_dir=pathlib.Path("maintesting")) print("Defining the version") version = portablemc.standard.Version(version="1.16.5",context=context) print("installing") env = version.install() print("Running") env.run() threading.Thread(target=threadlaunch,daemon=True).start() window = ctk.CTk() startbutton = ctk.CTkButton(window,text="Start",command=launch) startbutton.pack(pady=10,padx=10,fill="both") window.mainloop()

Error: (some parts of that error might be in german, i hope thats not a problem) Exception in thread Thread-1 (threadlaunch): Traceback (most recent call last): File "threading.py", line 1073, in _bootstrap_inner self.run() File "threading.py", line 1010, in run self._target(*self._args, **self._kwargs) File "tes.py", line 11, in threadlaunch env = version.install() ^^^^^^^^^^^^^^^^^ File "standard.py", line 326, in install self._download(watcher) File "standard.py", line 967, in _download for result_count, result in self._dl.download(threads_count, partial_progress=True): File "download.py", line 213, in download raise ValueError(f"unexpected crash from thread {crash.thread_id}", crash.origin) ValueError: ('unexpected crash from thread 53', PermissionError(13, 'Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird'))

AinRyzen commented 4 months ago

Never mind, just installed version 4.4.0 and everything works. But I had to install the package manually using the folder from GitHub. Please update the pip install version.

mindstorm38 commented 4 months ago

This should already be the case, just use pip install --upgrade to upgrade