sshivaji / kivy-chess

Chess Application using Kivy.
43 stars 15 forks source link

spur #9

Open puba opened 9 years ago

puba commented 9 years ago

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 <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?

sshivaji commented 9 years ago

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 notifications@github.com 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.

puba commented 9 years ago

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

sshivaji commented 9 years ago

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 notifications@github.com 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.

puba commented 9 years ago

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

sshivaji commented 9 years ago

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 notifications@github.com 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.

puba commented 9 years ago

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

sshivaji commented 9 years ago

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

On Jul 1, 2015, at 9:09 AM, puba notifications@github.com 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 commented 9 years ago

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 notifications@github.com 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.

puba commented 9 years ago

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

sshivaji commented 9 years ago

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 notifications@github.com 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.

puba commented 9 years ago

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 commented 9 years ago

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

sshivaji commented 9 years ago

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 notifications@github.com 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.

puba commented 9 years ago

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.

sshivaji commented 9 years ago

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 notifications@github.com 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.

puba commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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?

sshivaji commented 9 years ago

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 notifications@github.com 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.

puba commented 9 years ago

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?

sshivaji commented 9 years ago

Did you run install.sh?

On Jul 6, 2015, at 11:03 PM, puba notifications@github.com 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.

puba commented 9 years ago

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.

sshivaji commented 9 years ago

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 notifications@github.com 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.

puba commented 9 years ago

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.