jason-green-io / papyri

Minecraft map item data mapping tool using Leaflet
MIT License
63 stars 9 forks source link

No module named 'bedrock' #21

Closed AMGitsKriss closed 4 years ago

AMGitsKriss commented 4 years ago

I can't seem to run this, I get a package not found error, and the provided documentation is minimal. I assume I'm missing something really obvious?

Python Version 3.8.2. Trying to build a Java 1.16 world, but if it's failing on an import/includes I assume that's not the problem?

Thanks,

C:\Users\Kriss\Downloads\papyri-master\papyri-master>python papyri.py --world "C:\MC1.16\world\"
Traceback (most recent call last):
  File "papyri.py", line 7, in <module>
    import bedrock.leveldb as leveldb
ModuleNotFoundError: No module named 'bedrock'
mslowikowski commented 4 years ago

Did you clone the whole repo? It contains the leveldb dependency.

Don’t forget you need to run the pip install command in the README.md

AMGitsKriss commented 4 years ago

I've done both of those. On further investigation it looks like it's because I'm in windows and the app is written with linux in mind.

I bodged three things to make this work:

  1. To resolve the above error, I deleted the "bedrock" text file and renamed the "BluCodeGH-bedrock" folder to "bedrock".
  2. I also had to use directories with forward slashes in the arguments (so "C:/" instead of the "C:\" you'd expect with windows)
  3. But, I had to change papyri.py:509 from split("/") to split("\\")
jason-green-io commented 4 years ago

Glad you got it to work. I don't have windows to test. Looks like I'll have to take a look at how I mangle paths. The os.path module probably would be better used there. As for the dependency, the file is actually supposed to be a shortcut/link to BluCodeGH's code. I'll have to revamp that too.

mslowikowski commented 4 years ago

I ran into the same issue with the symbolic link. When I cloned the project in Windows with git it converted the file to plaintext. So even copying into a linux container with a Dockerfile didn’t work since the file was already broken. Cloning within the linux container worked however. I might have fixed it with changing my line endings settings, but I don’t recall exactly.

I have a dockerized branch on my fork but that was right before all the recent work to push 1.0. It’s probably mostly irrelevant now.

jason-green-io commented 4 years ago

Made some changes, anyone with Windows care to test out the dev branch?

jason-green-io commented 4 years ago

I don't have Windows to test. I'll assume this is fixed. Reopen if necessary.