Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

name 'myPDDL' is not defined #10

Open
newarney opened this issue Aug 21, 2019 · 5 comments
Open

name 'myPDDL' is not defined #10

newarney opened this issue Aug 21, 2019 · 5 comments

Comments

@newarney
Copy link

Hello!

I am trying to use myPDDL in Sublime, but when trying to calculate the distance, I find the following error:

myPDDL-distance
Traceback (most recent call last):
File "", line 1, in
NameError: name 'myPDDL' is not defined
Exception in thread Thread-6:
Traceback (most recent call last):
File "./python3.3/threading.py", line 901, in _bootstrap_inner
File "/home/newarney/.config/sublime-text-3/Packages/myPDDL/mypddl.py", line 40, in run
subprocess.Popen([self.mypddl_cmd, "distance", self.file_name])
File "./python3.3/subprocess.py", line 819, in init
File "./python3.3/subprocess.py", line 1386, in _execute_child
TypeError: Can't convert 'NoneType' object to str implicitly


I am using Ubuntu 18.04.3 LTS OS (64 bit).

Thank you!

@Pold87
Copy link
Owner

Pold87 commented Sep 5, 2019

Hi!
Have you tried to run the distance calculation from the command line (i.e.,
not within Sublime Text)? What happens if you type myPDDL distance example.pddl?

@newarney
Copy link
Author

newarney commented Sep 9, 2019

Hello,

I solved the problem. The point is, I'm using Sublime Text 3, but myPDDL path was pointing to Sublime Text 2. The path fix looks like this:
path=~/.config/sublime-text-3/Packages/myPDDL

Thank you!

@Pold87
Copy link
Owner

Pold87 commented Sep 10, 2019

Thank you for the feedback! I'll update the README so that it points to Sublime 3.

@anentropic
Copy link

is there not some way to have this line from myPDDL file:

path=~/.config/sublime-text-2/Packages/myPDDL

...to just use the current path of the myPDDL file itself?

That would be a better default

Then you can just add

export PATH=$PATH:<path to Sublime Text>/Packages/myPDDL

to your .bashrc as per the README and be done

@anentropic
Copy link

here is a way for that:

# Set this path to the myPDDL folder
# Don't use a trailing slash (right: /myPDDL, wrong: /myPDDL/)
path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

as found here https://stackoverflow.com/a/246128/202168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants