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

I encountered a error: #12

Closed
lk1983823 opened this issue Dec 30, 2017 · 12 comments
Closed

I encountered a error: #12

lk1983823 opened this issue Dec 30, 2017 · 12 comments

Comments

@lk1983823
Copy link

When I clone a MNIST Classifier project and run it, I have an error like below:

Traceback (most recent call last): File "/tmp/main.py", line 1524, in instance_0.Run() File "/tmp/main.py", line 869, in Run instance = AIBlocks.InitModel(load_path=self.save_path) TypeError: unbound method InitModel() must be called with AIBlocks instance as first argument (got nothing instead)

I am using python 2.7.6 and tensorflow 1.3.0.

Thank you!

@MrNothing
Copy link
Owner

MrNothing commented Dec 30, 2017

Hi,
Thank you for using AI-Blocks, you need to install python 3.0+ for the program to work. Make sure there is a reference to python.exe in the path as well. I also suggest updating Tensorflow (not mandatory).

@lk1983823
Copy link
Author

@MrNothing thank you for your reply. Btw, can it run in a anaconda environment and how?

@MrNothing
Copy link
Owner

MrNothing commented Dec 30, 2017

Conda environments are not supported for the moment, I am planning on adding the option since it would not be very hard to do on my side. I will let you know when this is implemented.

@lk1983823
Copy link
Author

My default python interpreter in Ubuntu14.04 is 2.7 and I often use anaconda3 evironment to run python files. So, how to let AI-blocks run under python3?

@MrNothing
Copy link
Owner

you would need to update python from 2.7 to 3.5. You can follow these instructions: https://superuser.com/questions/241865/updating-python-on-ubuntu-system

@lk1983823
Copy link
Author

I already have python3 in my ubuntu. Just run the command python3 instead of python. But by default, i think the system choose python2.7 to run. I just find a solution here, https://askubuntu.com/questions/590027/how-to-set-python-3-as-default-interpreter-in-ubuntu-14-04/590030. Can this make available by adding an alias for python to run python3?

@MrNothing
Copy link
Owner

The issue is that python is executed from my command prompt (more specifically, i spawn a default console process) on AI-Blocks' side. I would need to add the alias on this subprocess, unless the alias command could be made global which i doubt.

@MrNothing
Copy link
Owner

MrNothing commented Dec 30, 2017

One quick fix if you run the project from the sources is to modify the file ProjectRunner.js and replace const exec = spawn('python', [folder+'/main.py']); with const exec = spawn('python3', [folder+'/main.py']); until i implement custom commands. I'm sorry for the inconvenience.

@lk1983823
Copy link
Author

thank you very much, I will try it when I am back home. :) +1:

@lk1983823
Copy link
Author

lk1983823 commented Dec 30, 2017

@MrNothing  I can't find the file ProjectRunner.js in your file AI-blocks.I download the file linux-x64.7z (v1.6.15) and unziped it directly in my ubuntu.

@MrNothing
Copy link
Owner

It only works if you run the project from the sources, if you take the prebuilt Linux version, the sources are not avaliable. Running the project from the sources is a tedious task as it requires to have other dependencies installed such as npm and electron.

@lk1983823
Copy link
Author

lk1983823 commented Dec 30, 2017

okay thx. And using the prebuilt Linux version, when I want to add script, it shows dark background and nothing else.

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

2 participants