behavior3 / behavior3py

Behavior3 client library for Python (Behavior Tree for Python)
MIT License
93 stars 32 forks source link

b3 module missing #2

Open pirobot opened 7 years ago

pirobot commented 7 years ago

It seems that the b3.py module is missing:

python test_basenode.py 
Traceback (most recent call last):
  File "test_basenode.py", line 6, in <module>
    import b3
ImportError: No module named b3
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39381458-b3-module-missing?utm_campaign=plugin&utm_content=tracker%2F18331379&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18331379&utm_medium=issues&utm_source=github).
thecrazything commented 7 years ago

I managed to find a "fix" (albeit a messy one). Copy the b3 init.py to its parent folder. Change all "import b3" to "import behavior3py as b3". New folder structure will then be:

behavior3py
    | __init__.py (copied from the b3 __init__.py)
    | b3
        | __init__.py (empty file)
        | actions
        | composites
        | core
        | decorators
    | tests

For some reason, this works (running python 2.7)

pirobot commented 7 years ago

Thanks, but unfortunately that does not work for me (also using Python 2.7). Instead, I now get the error:

$ python test_basenode.py 
Traceback (most recent call last):
  File "test_basenode.py", line 6, in <module>
    import behavior3py as b3
ImportError: No module named behavior3py