Open quintendewilde opened 7 years ago
You need to go to the to the downloaded directory which by default should be AI_Writer. so find this directory and migrate to this directory using cd
and then run python
from this directory , it would most probably work
from my user folder I cd in to AI_Writer
Console gives me :
AI_writer myname$ ls
README.md decoder.py embedding.pyc images skipthoughts.py
config.py decoder.pyc generate.py search.py skipthoughts.pyc
config.pyc embedding.py generate.pyc search.pyc test.py
And from here I did python import generate.
Any other idea what might call this error?
Can you please write down the full stacktrace that you get after executing this:
$ python
>>> import generate
I get following trace, though it's different than the one before...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/myname/AI_Writer/generate.py", line 53
print 'NEAREST-CAPTIONS: '
^
SyntaxError: Missing parentheses in call to 'print'
Ok, So its not an ImportError
now its a Syntax Error
. Are you using Python 3.5?
When using python in console following shows
Python 3.6.0 |Anaconda 4.3.1 (x86_64)| (default, Dec 23 2016, 13:19:00)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
3.6 is ok? It's definitely not 2.7 though I have this also. (don't know how to switch though...)
Well this is the problem this script was written for Python 2 and not for Python 3 . I assume that you have Python 2 as well if not I recommend you to download Python 2.7 . And then you can launch Python 2 just by typing python
and Python 3 by typing python3
I hope this helps!
I did python2 in console and got this:
Myname:AI_writer Myname$ python2
Python 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:05:08)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import generate
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "generate.py", line 14, in <module>
import config
File "config.py", line 21, in <module>
if not config.FLAG_CPU_MODE:
AttributeError: 'module' object has no attribute 'FLAG_CPU_MODE'
This is a totally different new error..
Yes thats a bug in this script but when I debugged this error a new error popped up. After studying the working of this script for a while I came out with this conclusion that there is something wrong with the config.py file.
So this should be reported as a bug? And is there a workaround?
According to me its a bug and I haven't found a workaround yet
Is this something that you thing that might be fixed in the nearby future?
I am not sure about that and I cant promise you anything.
I have found a fix for the issue. You can get the config.py flie from this link https://github.com/ryankiros and going to this storyteller repo. After replacing the file if you have any issues feel free to ask because I ran it on my system and works perfectly fine.
Hi my console starts with this when running python:
I did all installation dependencies. Where can I locate the generate module to install for.