Closed tokejepsen closed 6 years ago
Next after that comes this error:
C:\Users\admin\batman>A:\avalon.bat --import batman
error: requires 'mongoimport' to be on your PATH
It's a limitation of the avalon
executable having the same name as avalon
the Python package. Python will look for modules in the current working directory, so you can't be in the directory of the executable whilst using it.
$ c:
$ a:\avalon --import batman
It's a limitation, was considering renaming the exe to ava
or the like.
error: requires 'mongoimport' to be on your PATH
This is where we need to update the exe for this repo. The original file assumed Mongo would be installed. Now instead it is running in Docker.
It's a limitation of the avalon executable having the same name as avalon the Python package. Python will look for modules in the current working directory, so you can't be in the directory of the executable whilst using it.
Maybe we should start with elaborating on the error message?
I'd rather get rid of the error, to be honest. Let's call it ava.py
? "The Avalon CLI"?
Or avalon_cli.py
?
On Linux, the Python file is also the executable and it'd be preferable if it's something short and sweet. Something you wouldn't mind typing over and over.
Alternatively, we could call it that, and have a .bat
and .sh
executable for calling it on the command-line on either platform.
On Linux, the Python file is also the executable and it'd be preferable if it's something short and sweet. Something you wouldn't mind typing over and over.
Ohh, I thought this was the entry point for Linux/Mac?
Yeah, it can be, I've included both to support shells other than Bash, shells that support running Python as-is. But we can limit support to Bash for the time being.
This is where we need to update the exe for this repo. The original file assumed Mongo would be installed. Now instead it is running in Docker.
The error originates from the examples project. Could you point in the direction of an alternative?
The example is calling on mongoimport
which is an executable added to your PATH
when installing mongo. Now that Mongo is in a container, we need to instead call docker exec getavalon/docker /usr/bin/mongoimport
(with it full path) with similar arguments.
The container has access to the resources (A:\
) at /avalon
.
Now that Mongo is in a container, we need to instead call docker exec getavalon/docker /usr/bin/mongoimport (with it full path) with similar arguments.
That would assume you have access to docker in the examples project. Is that not cross pollution?
Just had a successful brief run-through on David's fork.
This does not need mongoimport
, and works with the Docker container.
Cool, that sounds a lot better.
I accidentally pushed changes directly to the repository to fix this issue: https://github.com/getavalon/docker/commit/745130eaad4982a01cd384c3d64ee7f76c008ef8
Going through the demo, and getting this slightly mysterious error: