kivy-chess icon indicating copy to clipboard operation
kivy-chess copied to clipboard

spur

Open puba opened this issue 9 years ago • 24 comments

I got import error when tying to run kivy-chess: $ kivy main.py [INFO ] [Logger ] Record log in /Applications/Kivy.app/Contents/Resources/.kivy/logs/kivy_15-07-01_14.txt [INFO ] [Kivy ] v1.9.0 [INFO ] [Python ] v2.7.6 (default, Sep 9 2014, 15:04:36) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] [INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_gif, img_sdl2 (img_pil, img_ffpyplayer ignored) [INFO ] [Factory ] 173 symbols loaded [INFO ] [Text ] Provider: sdl2 [INFO ] [OSC ] using for socket [INFO ] [Window ] Provider: sdl2 [INFO ] [GL ] OpenGL version <2.1 NVIDIA-10.2.7 310.41.25f01> [INFO ] [GL ] OpenGL vendor <NVIDIA Corporation> [INFO ] [GL ] OpenGL renderer <NVIDIA GeForce GT 750M OpenGL Engine> [INFO ] [GL ] OpenGL parsed version: 2, 1 [INFO ] [GL ] Shading version <1.20> [INFO ] [GL ] Texture max size <16384> [INFO ] [GL ] Texture max units <16> [INFO ] [Window ] auto add sdl2 input provider [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked Traceback (most recent call last): File "main.py", line 63, in import spur ImportError: No module named spur

Can you help?

puba avatar Jul 01 '15 13:07 puba

The instructions are slightly old. You need to do chesspython/bin/python main.py. You can run install.sh to create chesspython.

On Jul 1, 2015, at 6:37 AM, puba [email protected] wrote:

I got import error when tying to run kivy-chess: $ kivy main.py [INFO ] [Logger ] Record log in /Applications/Kivy.app/Contents/Resources/.kivy/logs/kivy_15-07-01_14.txt [INFO ] [Kivy ] v1.9.0 [INFO ] [Python ] v2.7.6 (default, Sep 9 2014, 15:04:36) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] [INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_gif, img_sdl2 (img_pil, img_ffpyplayer ignored) [INFO ] [Factory ] 173 symbols loaded [INFO ] [Text ] Provider: sdl2 [INFO ] [OSC ] using for socket [INFO ] [Window ] Provider: sdl2 [INFO ] [GL ] OpenGL version <2.1 NVIDIA-10.2.7 310.41.25f01> [INFO ] [GL ] OpenGL vendor [INFO ] [GL ] OpenGL renderer [INFO ] [GL ] OpenGL parsed version: 2, 1 [INFO ] [GL ] Shading version <1.20> [INFO ] [GL ] Texture max size <16384> [INFO ] [GL ] Texture max units <16> [INFO ] [Window ] auto add sdl2 input provider [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked Traceback (most recent call last): File "main.py", line 63, in import spur ImportError: No module named spur

Can you help?

— Reply to this email directly or view it on GitHub.

sshivaji avatar Jul 01 '15 14:07 sshivaji

Somehow fix this, bit now I got this Traceback (most recent call last): File "main.py", line 5159, in ChessProgram_app().run() File "/Applications/Kivy.app/Contents/Resources/kivy/kivy/app.py", line 798, in run root = self.build() File "main.py", line 3052, in build self.user_book = LevelJsonDict('book/custom/watson.db') File "/Users/puba/kivy-chess/leveldict.py", line 11, in init self.db = leveldb.LevelDB(self.path) leveldb.LevelDBError: IO error: book/custom/watson.db/LOCK: No such file or directory

puba avatar Jul 01 '15 15:07 puba

Make blank folder custom in the folder book. I will make this in the source tree too.

On Jul 1, 2015, at 8:52 AM, puba [email protected] wrote:

Somehow fix this, bit now I got this Traceback (most recent call last): File "main.py", line 5159, in ChessProgram_app().run() File "/Applications/Kivy.app/Contents/Resources/kivy/kivy/app.py", line 798, in run root = self.build() File "main.py", line 3052, in build self.user_book = LevelJsonDict('book/custom/watson.db') File "/Users/puba/kivy-chess/leveldict.py", line 11, in init self.db = leveldb.LevelDB(self.path) leveldb.LevelDBError: IO error: book/custom/watson.db/LOCK: No such file or directory

— Reply to this email directly or view it on GitHub https://github.com/sshivaji/kivy-chess/issues/9#issuecomment-117723578.

sshivaji avatar Jul 01 '15 15:07 sshivaji

it is already there, with custom_books.txt file in there

puba avatar Jul 01 '15 15:07 puba

Try it now. I don’t know why you get that error I don’t. However, I added error handling around it.

On Jul 1, 2015, at 8:59 AM, puba [email protected] wrote:

it is already there, with custom_books.txt file in there

— Reply to this email directly or view it on GitHub https://github.com/sshivaji/kivy-chess/issues/9#issuecomment-117727085.

sshivaji avatar Jul 01 '15 16:07 sshivaji

No go. Looks like watson.db file is causing trouble....???

puba avatar Jul 01 '15 16:07 puba

What is the error now. I added error handling to ignore this error. Watson.db..

On Jul 1, 2015, at 9:09 AM, puba [email protected] wrote:

No go. Looks like watson.db file is causing trouble....???

— Reply to this email directly or view it on GitHub https://github.com/sshivaji/kivy-chess/issues/9#issuecomment-117731318.

sshivaji avatar Jul 01 '15 16:07 sshivaji

Puba, try the latest code change (just pushed). If it does not work, ping me on Skype. No idea why this should not work.

On Jul 1, 2015, at 9:09 AM, puba [email protected] wrote:

No go. Looks like watson.db file is causing trouble....???

— Reply to this email directly or view it on GitHub https://github.com/sshivaji/kivy-chess/issues/9#issuecomment-117731318.

sshivaji avatar Jul 01 '15 16:07 sshivaji

pull it and now this: Traceback (most recent call last): File "main.py", line 5159, in ChessProgram_app().run() File "/Applications/Kivy.app/Contents/Resources/kivy/kivy/app.py", line 798, in run root = self.build() File "main.py", line 3052, in build self.user_book = LevelJsonDict('book/custom.db') File "/Users/puba/kivy-chess/leveldict.py", line 14, in init logging.info("leveldb error with jsondict") NameError: global name 'logging' is not defined

puba avatar Jul 01 '15 16:07 puba

Thats due to my quick "fix". Do a pull and try again now.

Thanks for reporting!

On Wed, Jul 1, 2015 at 9:17 AM, puba [email protected] wrote:

pull it and now this: Traceback (most recent call last): File "main.py", line 5159, in ChessProgram_app().run() File "/Applications/Kivy.app/Contents/Resources/kivy/kivy/app.py", line 798, in run root = self.build() File "main.py", line 3052, in build self.user_book = LevelJsonDict('book/custom.db') File "/Users/puba/kivy-chess/leveldict.py", line 14, in init logging.info("leveldb error with jsondict") NameError: global name 'logging' is not defined

— Reply to this email directly or view it on GitHub https://github.com/sshivaji/kivy-chess/issues/9#issuecomment-117734211.

sshivaji avatar Jul 01 '15 16:07 sshivaji

pulling....still no luck

Traceback (most recent call last): File "main.py", line 5159, in ChessProgram_app().run() File "/Applications/Kivy.app/Contents/Resources/kivy/kivy/app.py", line 798, in run root = self.build() File "main.py", line 3053, in build self.ref_db_index_book = leveldb.LevelDB('book/polyglot_index.db') leveldb.LevelDBError: IO error: book/polyglot_index.db/LOCK: No such file or directory

puba avatar Jul 01 '15 16:07 puba

try to make polyglot leveldb index with errors:

$ sudo make install g++ -std=c++11 -pipe -fno-rtti -O2 -fomit-frame-pointer -c -o book_make.o book_make.cpp In file included from book_make.cpp:19: ./book_make.h:11:10: fatal error: 'leveldb/slice.h' file not found #include "leveldb/slice.h" ^ 1 error generated. make: *** [book_make.o] Error 1

puba avatar Jul 01 '15 16:07 puba

Can you share your run command? The virtual env leveldb version should create the db if it does not exist. Your version does not seem to be doing that

Sent from my iPhone

On Jul 1, 2015, at 9:24 AM, puba [email protected] wrote:

pulling....still no luck

Traceback (most recent call last): File "main.py", line 5159, in ChessProgram_app().run() File "/Applications/Kivy.app/Contents/Resources/kivy/kivy/app.py", line 798, in run root = self.build() File "main.py", line 3053, in build self.ref_db_index_book = leveldb.LevelDB('book/polyglot_index.db') leveldb.LevelDBError: IO error: book/polyglot_index.db/LOCK: No such file or directory

— Reply to this email directly or view it on GitHub.

sshivaji avatar Jul 01 '15 17:07 sshivaji

Run command is kivy main.py. Should I run chesspython/bin/python main.py? In latter case I get import error, no module named kivy.

puba avatar Jul 01 '15 17:07 puba

Run install.sh first and then it will install everything. then Run chesspython/bin/python main.py. Should be latter command.

Shiv

On Jul 1, 2015, at 10:28 AM, puba [email protected] wrote:

Run command is kivy main.py. Should I run chesspython/bin/python main.py? In latter case I get import error, no module named kivy.

— Reply to this email directly or view it on GitHub https://github.com/sshivaji/kivy-chess/issues/9#issuecomment-117758353.

sshivaji avatar Jul 01 '15 17:07 sshivaji

when running install got this error at the end:

In file included from book_make.cpp:19: ./book_make.h:11:10: fatal error: 'leveldb/slice.h' file not found #include "leveldb/slice.h" ^ 1 error generated. make: *** [book_make.o] Error 1

and when running chesspython/bin/python main.py:

$ chesspython/bin/python main.py Traceback (most recent call last): File "main.py", line 13, in import kivy ImportError: No module named kivy

puba avatar Jul 01 '15 18:07 puba

I don't get it, the same kivi import error if I create virtual environment or global one...where the install script put the kivi module?

puba avatar Jul 02 '15 10:07 puba

Here is my python path:

import sys print sys.path ['', '/Library/Python/2.7/site-packages/virtualenv-1.11.6-py2.7.egg', '/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg', '/Library/Python/2.7/site-packages/spur-0.3.14-py2.7.egg', '/Library/Python/2.7/site-packages/paramiko-1.15.2-py2.7.egg', '/Library/Python/2.7/site-packages/ecdsa-0.13-py2.7.egg', '/Library/Python/2.7/site-packages/pycrypto-2.6.1-py2.7-macosx-10.9-intel.egg', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', '/Library/Python/2.7/site-packages']

This causes problem with installation?

puba avatar Jul 06 '15 18:07 puba

Sorry, I lost this thread.

To compile leveldb, you need to install the leveldb dev package.

For the kivy stuff, see if ./chesspython works. Looks like you are not using the virtual python.

On Jul 6, 2015, at 11:56 AM, puba [email protected] wrote:

Here is my python path:

import sys print sys.path ['', '/Library/Python/2.7/site-packages/virtualenv-1.11.6-py2.7.egg', '/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg', '/Library/Python/2.7/site-packages/spur-0.3.14-py2.7.egg', '/Library/Python/2.7/site-packages/paramiko-1.15.2-py2.7.egg', '/Library/Python/2.7/site-packages/ecdsa-0.13-py2.7.egg', '/Library/Python/2.7/site-packages/pycrypto-2.6.1-py2.7-macosx-10.9-intel.egg', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynloa d', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', '/Library/Python/2.7/site-packages']

This causes problem with installation?

— Reply to this email directly or view it on GitHub https://github.com/sshivaji/kivy-chess/issues/9#issuecomment-118958144.

sshivaji avatar Jul 06 '15 20:07 sshivaji

Obviously leveldb is installed:

./chesspython/bin/pip install leveldb Requirement already satisfied (use --upgrade to upgrade): leveldb in /Library/Python/2.7/site-packages

and then when I activate virtual env and try running main.py:

source chesspython/bin/activate (chesspython)epl at epls-mbp in ~/kivy-chess on master* $ ./chesspython/bin/pip install leveldb Requirement already satisfied (use --upgrade to upgrade): leveldb in /Library/Python/2.7/site-packages (chesspython)epl at epls-mbp in ~/kivy-chess on master* $ ./chesspython/bin/python main.py Traceback (most recent call last): File "main.py", line 13, in import kivy ImportError: No module named kivy

Obviously modules are not recognised, should I put path to virtual env to python path?

puba avatar Jul 07 '15 06:07 puba

Did you run install.sh?

On Jul 6, 2015, at 11:03 PM, puba [email protected] wrote:

Obviously leveldb is installed:

./chesspython/bin/pip install leveldb Requirement already satisfied (use --upgrade to upgrade): leveldb in /Library/Python/2.7/site-packages

and then when I activate virtual env and try running main.py:

source chesspython/bin/activate (chesspython)epl at epls-mbp in ~/kivy-chess on master* $ ./chesspython/bin/pip install leveldb Requirement already satisfied (use --upgrade to upgrade): leveldb in /Library/Python/2.7/site-packages (chesspython)epl at epls-mbp in ~/kivy-chess on master* $ ./chesspython/bin/python main.py Traceback (most recent call last): File "main.py", line 13, in import kivy ImportError: No module named kivy

Obviously modules are not recognised, should I put path to virtual env to python path?

— Reply to this email directly or view it on GitHub https://github.com/sshivaji/kivy-chess/issues/9#issuecomment-119082239.

sshivaji avatar Jul 07 '15 06:07 sshivaji

Pip search returns that I have INSTALLED: 0.193 (latest) leveldb package. U don't know if it is the correct one, I can't find any other?

And virtualenv is installed in

which virtualenv /usr/local/bin/virtualenv

The chesspython in installed in /Users/epl/kivy-chess folder.

puba avatar Jul 07 '15 07:07 puba

You dont have to manually install using pip. Just running one command "install.sh" should do all. Running chesspython/bin/python main.py should do the trick. Even kivy should be installed by this one command.

On Tue, Jul 7, 2015 at 12:32 AM, puba [email protected] wrote:

Pip search returns that I have INSTALLED: 0.193 (latest) leveldb package. U don't know if it is the correct one, I can't find any other?

And virtualenv is installed in

which virtualenv /usr/local/bin/virtualenv

The chesspython in installed in /Users/epl/kivy-chess folder.

— Reply to this email directly or view it on GitHub https://github.com/sshivaji/kivy-chess/issues/9#issuecomment-119104355.

sshivaji avatar Jul 07 '15 08:07 sshivaji

Shiv, I did this at least fifty times, with error messages displayed in previous comments. There are warnings and conflicts in install script, which I can't resolve, unfortunately.

puba avatar Jul 07 '15 17:07 puba