presentation && launch error

37 views
Skip to first unread message

ghichtin

unread,
Dec 16, 2013, 5:19:47 PM12/16/13
to coinb...@googlegroups.com
Hi everybody!
Just joined the group and I already have some problems :-(
I run a small small (micro) garden center with my sister and I was searching for a POS management software.
Found it!
So I've tried to install it to give it a close look (used Alternate Install from the 'getting started' page)

Here is the result:

:~/coinbox/coinbox-core$ python coinbox.py 
[ERROR] root: An error stopped the application (coinbox.py:17)
[ERROR] root: No module named babel (coinbox.py:18)
Traceback (most recent call last):
  File "coinbox.py", line 12, in <module>
    import cbpos
  File "/home/simone/coinbox/coinbox-core/cbpos/__init__.py", line 50, in <module>
    from cbpos.core import *
  File "/home/simone/coinbox/coinbox-core/cbpos/core.py", line 7, in <module>
    from babel import Locale, UnknownLocaleError
ImportError: No module named babel
[INFO]  root: Exiting... (coinbox.py:20)

Could you please give me some directions?
Thanks,
S.

P.S. If you are interested I could possibly do Italian translations

Jad Kik

unread,
Dec 16, 2013, 5:29:29 PM12/16/13
to coinb...@googlegroups.com
Hey!

The issue is that there's a dependency missing. You need to install a package called babel.

Try something like:

     pip install Babel

I'll fix this, and fix the instructions too. There's an easier way to do all this. But since you got there, you should be good.

We'll have to start somewhere eventually. :)

Please do let us know of any problems you encounter.

ghichtin

unread,
Dec 16, 2013, 6:22:04 PM12/16/13
to coinb...@googlegroups.com


Il giorno lunedì 16 dicembre 2013 23:29:29 UTC+1, Jad Kik ha scritto:
Hey!

The issue is that there's a dependency missing. You need to install a package called babel.



OK. Done.
Now it starts.
All I got is an empty window with an Exit button.

I think I'm still missing something:

[WARNING] cbpos.modules: (0) modules disabled for missing dependencies: (modules.py:261)

Now it's a little late... I'll have to investigate tomorrow

Thanx
S.

Jad Kik

unread,
Dec 17, 2013, 5:20:21 AM12/17/13
to coinb...@googlegroups.com
Ok that warning you are seeing is normal, but the problem is that the modules are not seen by coinbox.

The best way to do this is by running this command in each of the modules directory.

So you `cd` into each module, then run `python setup.py develop`.

Another way is to update the configuration file manually. Look for a file called coinbox.json, you'll see there these lines:

    "mod": {
        "disabled_modules": [],
        "modules_path": []
    },

And add to modules_path an entry for each module, like this:

    "mod": {
        "disabled_modules": [],
        "modules_path": ["../mod/base","../mod/config","../mod/auth","../mod/currency","../mod/sales","../mod/stock","../mod/customer"]
    },

Any of these will work.

Also, if you still see something wrong, open coinbox.json and you should see:

     "log": "INFO",

Replace INFO by DEBUG and you'll have a more complete output for us to help you.

Usually, you shouldn't have to go through all this to install it, but we're still in early development, so bare with us a little bit. I'll fix things up in a few days max.

Thank you for your patience :)

ghichtin

unread,
Dec 17, 2013, 8:08:04 AM12/17/13
to coinb...@googlegroups.com


Il giorno martedì 17 dicembre 2013 11:20:21 UTC+1, Jad Kik ha scritto:

[...]


Any of these will work.

And it did.

 

Also, if you still see something wrong, open coinbox.json and you should see:

     "log": "INFO",

Replace INFO by DEBUG and you'll have a more complete output for us to help you.


Done.
 
Usually, you shouldn't have to go through all this to install it, but we're still in early development, so bare with us a little bit. I'll fix things up in a few days max.

I am completely fine with that.
And I'm going to help as I can.


Thank you for your patience :)


No way; thanks to you, instead! ;-)

Before I continue, I'd like to ask if I'm supposed to setup the mysql database in some way.

Regards,
S.

Jad Kik

unread,
Dec 17, 2013, 8:18:38 AM12/17/13
to coinb...@googlegroups.com
Great! Thanks.

For the mysql database, just create an empty database, something like:

    $ mysql -u {username} -p{password}
    > CREATE DATABASE coinbox;

Then run:

    $ ./coinbox config

And then set the database type to MySQL, enter {username} and {password} and {hostname} if required with the database name "coinbox" or whatever else you used.

You should be able to use SQLite too if it's only running on one PC. although I don't recommend it because you might encounter some problems because SQLite doesn't deal well with the prices (its data types are not very precise when storing currency values).

Hope you like it.

ghichtin

unread,
Dec 17, 2013, 9:02:29 AM12/17/13
to coinb...@googlegroups.com


Il giorno martedì 17 dicembre 2013 14:18:38 UTC+1, Jad Kik ha scritto:

Then run:

    $ ./coinbox config



Didn't work.
I don't have any executable named coinbox (or at least I can't see it)

I got

bash:  ./coinbox: Is a directory (translated from IT)

I've tried to run coinbox.py but I've got an

Error when calling the metaclass bases
cannot create 'NoneType' instance (coinbox.py:18)

and then a list of File "..."

As you see you've got to be veeery patient :-)
Or send me to hell

S.

Jad Kik

unread,
Dec 17, 2013, 9:24:57 AM12/17/13
to coinb...@googlegroups.com
Yeah, right. You don't have the coinbox executable. It's just that I made a symlink to the coinbox.py file, and I forgot about it.

So running `python coinbox.py config` does not work... Can you write the full traceback (the bunch of files) because coinbox.py:18 does not help much.

And you are the one who should be patient because of all these issues :)

ghichtin

unread,
Dec 17, 2013, 11:04:41 AM12/17/13
to coinb...@googlegroups.com
OK so let's be patient one with each other :-D

But believe me it's not a big deal; since I've entered the linux universe I am accustomed to rough edges

:~/coinbox/coinbox-core$ python coinbox.py
[INFO]  cbpos.core: Python: 2.7.5+ (default, Sep 19 2013, 13:48:49) 
[GCC 4.8.1] (core.py:120)
[DEBUG] cbpos.core: Importing database... (core.py:122)
[DEBUG] cbpos.core: Importing modules... (core.py:125)
[DEBUG] cbpos.core: Running application... (core.py:128)
[DEBUG] cbpos.modules: Loading modules... (modules.py:189)
[DEBUG] cbpos.modules: Path (9): [u'/home/simone/coinbox/mod/base', u'/home/simone/coinbox/mod/customer', '/usr/local/lib/python2.7/dist-packages/CoinboxMod_base-0.1-py2.7.egg/cbpos/mod', u'/home/simone/coinbox/mod/auth', u'/home/simone/coinbox/mod/stock', u'/home/simone/coinbox/mod/config', u'/home/simone/coinbox/mod/currency', '/home/simone/coinbox/coinbox-core/cbpos/mod', u'/home/simone/coinbox/mod/sales'] (modules.py:190)
[ERROR] root: An error stopped the application (coinbox.py:17)
[ERROR] root: Error when calling the metaclass bases
    cannot create 'NoneType' instances (coinbox.py:18)
Traceback (most recent call last):
  File "coinbox.py", line 13, in <module>
    cbpos.run()
  File "/home/simone/coinbox/coinbox-core/cbpos/core.py", line 130, in run
    cbpos.modules.init()
  File "/home/simone/coinbox/coinbox-core/cbpos/modules.py", line 392, in init
    return initializer.run()
  File "/home/simone/coinbox/coinbox-core/cbpos/modules.py", line 217, in run
    self.packages += [p for p in pkgutil.walk_packages(self.path) \
  File "/usr/lib/python2.7/pkgutil.py", line 125, in walk_packages
    for item in walk_packages(path, name+'.', onerror):
  File "/usr/lib/python2.7/pkgutil.py", line 125, in walk_packages
    for item in walk_packages(path, name+'.', onerror):
  File "/usr/lib/python2.7/pkgutil.py", line 125, in walk_packages
    for item in walk_packages(path, name+'.', onerror):
  File "/usr/lib/python2.7/pkgutil.py", line 125, in walk_packages
    for item in walk_packages(path, name+'.', onerror):
  File "/usr/lib/python2.7/pkgutil.py", line 125, in walk_packages
    for item in walk_packages(path, name+'.', onerror):
  File "/usr/lib/python2.7/pkgutil.py", line 110, in walk_packages                                                                                                                              
    __import__(name)                                                                                                                                                                            
  File "/home/simone/coinbox/mod/base/cbpos/mod/base/models/__init__.py", line 2, in <module>                                                                                                   
    from .storedfile import StoredFile                                                                                                                                                          
  File "/home/simone/coinbox/mod/base/cbpos/mod/base/models/storedfile.py", line 9, in <module>
    from cbpos.mod.base.models import Item
  File "/usr/local/lib/python2.7/dist-packages/CoinboxMod_base-0.1-py2.7.egg/cbpos/mod/base/models/__init__.py", line 2, in <module>
    from .storedfile import StoredFile
  File "/usr/local/lib/python2.7/dist-packages/CoinboxMod_base-0.1-py2.7.egg/cbpos/mod/base/models/storedfile.py", line 15, in <module>
    class StoredFile(cbpos.database.Base, Item):
TypeError: Error when calling the metaclass bases
    cannot create 'NoneType' instances
[INFO]  root: Exiting... (coinbox.py:20)
[INFO]  cbpos.core: Terminating application... (core.py:109)

Best regards,
S.

Jonathan Aquilina

unread,
Dec 17, 2013, 11:06:26 AM12/17/13
to coinb...@googlegroups.com
ghichtin What you are doing in working with jad is helping improve coinbox as a whole :) I soon will be in your position for an embedded systems project I am working on which is going to be a low cost point of sales system which runs coinbox


--
You received this message because you are subscribed to the Google Groups "Coin Box POS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coinboxpos+...@googlegroups.com.
To post to this group, send email to coinb...@googlegroups.com.
Visit this group at http://groups.google.com/group/coinboxpos.
For more options, visit https://groups.google.com/groups/opt_out.



--
Jonathan Aquilina

Jad Kik

unread,
Dec 17, 2013, 11:34:25 AM12/17/13
to coinb...@googlegroups.com
Okay, found your issue.

The problem is that you installed the same module twice. If you look in the path, the "base" module is there twice:
  • /home/simone/coinbox/mod/base
  • /usr/local/lib/python2.7/dist-packages/CoinboxMod_base-0.1-py2.7.egg/cbpos/mod

So I think you probably used `python setup.py install` the first time, then `python setup.py develop` another time. The error is not very verbose... I don't know if I can do anything about it. Maybe a warning.

Try something similar to this to uninstall the "install"/egg version: pip uninstall CoinboxMod_base

And let's hope this installation mess is solved now :)

Reply all
Reply to author
Forward
0 new messages