bookieio / Bookie

Python based delicious.com replacement
GNU Affero General Public License v3.0
633 stars 138 forks source link

Problems building #204

Closed jpschewe closed 11 years ago

jpschewe commented 11 years ago

I tried building develop and got

bin/pip install --no-index --no-dependencies --find-links file:///download-cache
/python -r requirements.txt
Ignoring indexes: http://pypi.python.org/simple
Downloading/unpacking Mako==0.4.1 (from -r requirements.txt (line 16))
  Could not find any downloads that satisfy the requirement Mako==0.4.1 (from -r
 requirements.txt (line 16))
No distributions at all found for Mako==0.4.1 (from -r requirements.txt (line 16
))
Storing complete log in /home/jpschewe/.pip/pip.log
make: *** [deps] Error 1

I tried building 0.4.1 and got further, but it still died

PIP_FIND_LINKS='http://mypi http://simple.crate.io/' bin/pip install -q -r requi
rements.txt
bin/alembic upgrade head
Traceback (most recent call last):
  File "bin/alembic", line 9, in <module>
    load_entry_point('alembic==0.3.4', 'console_scripts', 'alembic')()
  File "/home/jpschewe/src/Bookie/lib/python2.6/site-packages/alembic/config.py"
, line 229, in main
    **dict((k, getattr(options, k)) for k in kwarg)
  File "/home/jpschewe/src/Bookie/lib/python2.6/site-packages/alembic/command.py
", line 120, in upgrade
    script.run_env()
  File "/home/jpschewe/src/Bookie/lib/python2.6/site-packages/alembic/script.py"
, line 188, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/home/jpschewe/src/Bookie/lib/python2.6/site-packages/alembic/util.py", 
line 185, in load_python_file
    module = imp.load_source(module_id, path, open(path, 'rb'))
  File "dbversions/env.py", line 27, in <module>
    bookie_config = load_bookie_ini(bookie_ini)
  File "dbversions/env.py", line 18, in load_bookie_ini
    ini.set('app:main', 'here', here)
  File "/usr/lib/python2.6/ConfigParser.py", line 377, in set
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'app:main'
make: *** [bookie.db] Error 1

I'm building on debian 6.0.7 with python 2.6.6.

I get the same behavior on Ubuntu 12.10 with python 2.7.3.

mitechie commented 11 years ago

Hmm, does the download-cache exist in the current directory?

mitechie commented 11 years ago

It is true I recently updated the app section in the ini files from app:main to app:bookie as part of hooking up the remote error tracking. I'll have branch shortly that updates those instances.

mitechie commented 11 years ago

Pushed an update to develop with fixes for the ini issue. I did a successful fresh test build using the instructions http://docs.bmark.us/en/latest/install.html

Going to mark as fixed, but please let me know if you continue to have issues with the updated develop branch.

mitechie commented 11 years ago

Hmm, I got an email about a follow up comment but I don't see it here.

If bin/ isn't defined then the virtualenv is missing. Was this the same checkout as hit the first issue? The two things to try are to

make clean_all make install make run

Or to just rm -rf the whole checkout directory and start from scratch. The make install command should setup a virtualenv that everything else works with.

mitechie commented 11 years ago

If you still have issues try to find time to log into #bookie on freenode irc and I can help with things in real time.

jpschewe commented 11 years ago

Yeah I posted my error too soon. Turns out it was my mistake. My server connection timed out during the build. I'm redoing the build inside tmux so that the timeout doesn't kill the install command. If I get stuck I'll try and login to IRC. I'm working on this in between things.

jpschewe commented 11 years ago

I've left it running a couple of times now and github keeps timing out cloning the bookie-download-cache.

mitechie commented 11 years ago

Hmm, does the clone command work for you without running from make?

git clone "git://github.com/mitechie/bookie-download-cache.git" download-cache

This is where it's running from. https://github.com/mitechie/Bookie/blob/develop/Makefile#L125

On Mon, Mar 25, 2013 at 7:41 AM, Jon Schewe notifications@github.comwrote:

I've left it running a couple of times now and github keeps timing out cloning the bookie-download-cache.

— Reply to this email directly or view it on GitHubhttps://github.com/mitechie/Bookie/issues/204#issuecomment-15388577 .

jpschewe commented 11 years ago

I tried the git clone command directly this morning and that times out too. I tried it on a different system and it succeeded. I'm now thinking there's something else getting in my way on my server. I had some trouble with SourceForge too and switching from git:// to http:// fixed it. I found that this change fixed my clone of bookie too.

jpschewe commented 11 years ago

Failed on the Mako install again:

remote: Total 109 (delta 11), reused 100 (delta 2)                             
Receiving objects: 100% (109/109), 66.10 MiB | 4.72 MiB/s, done.               
Resolving deltas: 100% (11/11), done.                                          
bin/pip install --no-index --no-dependencies --find-links file:///download-cache/python -r requirements.
Ignoring indexes: http://pypi.python.org/simple                                
Downloading/unpacking Mako==0.4.1 (from -r requirements.txt (line 16))         
  Could not find any downloads that satisfy the requirement Mako==0.4.1 (from -r requirements.txt (line 16))                                                  
No distributions at all found for Mako==0.4.1 (from -r requirements.txt (line 16))                                                                            
Storing complete log in /home/jpschewe/.pip/pip.log                            
make: *** [deps] Error 1
mitechie commented 11 years ago

On Mon, 25 Mar 2013, Jon Schewe wrote:

I tried the git clone command directly this morning and that times out too. I tried it on a different system and it succeeded. I'm now thinking there's something else getting in my way on my server. I had some trouble with SourceForge too and switching from git:// to http:// fixed it. I found that this change fixed my clone of bookie too.

Ah, ok thanks for the heads up. I've updated it from git:// to http:// in the develop branch. Sorry about the trouble with this.

Rick Harding @mitechie http://blog.mitechie.com http://lococast.net

mitechie commented 11 years ago

On Mon, 25 Mar 2013, Jon Schewe wrote:

Failed on the Mako install again:

remote: Total 109 (delta 11), reused 100 (delta 2)
Receiving objects: 100% (109/109), 66.10 MiB | 4.72 MiB/s, done.
Resolving deltas: 100% (11/11), done.
bin/pip install --no-index --no-dependencies --find-links file:///download-cache/python -r requirements.
Ignoring indexes: http://pypi.python.org/simple
Downloading/unpacking Mako==0.4.1 (from -r requirements.txt (line 16))
  Could not find any downloads that satisfy the requirement Mako==0.4.1 (from -r requirements.txt (line 16))
No distributions at all found for Mako==0.4.1 (from -r requirements.txt (line 16))
Storing complete log in /home/jpschewe/.pip/pip.log

Ugh, back to square one. So can you verify that in your download-cache you find Mako?

ls download-cache/python/Mako-0.4.1.tar.gz

What pip version do you have? Can you try updating it in the vitualenv?

bin/pip --version bin/pip install -U pip

Rick Harding @mitechie http://blog.mitechie.com http://lococast.net

jpschewe commented 11 years ago
[git:develop] >ls -l download-cache/python/Mako-0.4.1.tar.gz                   │
-rw-r--r-- 1 jpschewe jpschewe 317306 Mar 25 10:10 download-cache/python/Mako-0│
.4.1.tar.gz

I don't know how to check the version of pip. --version and -version don't work. I haven't used pip and virtualenv before, so I'm not sure how I would update it in the virtualenv.

mitechie commented 11 years ago

those commands should have worked.

do you have a bin/pip file? Everything in that bin directory is the virtualenv.

what does bin/pip --help output?

mitechie commented 11 years ago

http://paste.mitechie.com/show/911/ is some output to figure out...

jpschewe commented 11 years ago

Executing "make run" after manually using bin/pip to install all of the requirements.

Starting subprocess with file monitor
Traceback (most recent call last):
  File "bin/paster", line 9, in <module>
    load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
  File "/home/jpschewe/src/Bookie/lib/python2.6/site-packages/paste/script/comm
and.py", line 104, in run
    invoke(command, command_name, options, args[1:])
  File "/home/jpschewe/src/Bookie/lib/python2.6/site-packages/paste/script/comm
and.py", line 143, in invoke
    exit_code = runner.run(args)
  File "/home/jpschewe/src/Bookie/lib/python2.6/site-packages/paste/script/comm
and.py", line 238, in run
    result = self.command()
  File "/home/jpschewe/src/Bookie/lib/python2.6/site-packages/paste/script/serv
e.py", line 279, in command
    self.logging_file_config(log_fn)
  File "/home/jpschewe/src/Bookie/lib/python2.6/site-packages/paste/script/comm
and.py", line 788, in logging_file_config
    here=os.path.dirname(config_file)))
  File "/usr/lib/python2.6/logging/config.py", line 84, in fileConfig
    handlers = _install_handlers(cp, formatters)
  File "/usr/lib/python2.6/logging/config.py", line 162, in _install_handlers
    h = klass(*args)
  File "/home/jpschewe/src/Bookie/lib/python2.6/site-packages/raven/handlers/lo
gging.py", line 29, in __init__
    self.client = client(dsn=arg)
  File "/home/jpschewe/src/Bookie/lib/python2.6/site-packages/raven/base.py", l
ine 147, in __init__
    dsn_config = raven.load(dsn, transport_registry=self._registry)
  File "/home/jpschewe/src/Bookie/lib/python2.6/site-packages/raven/conf/__init
__.py", line 49, in load
    raise ValueError('Unsupported Sentry DSN scheme: %r' % url.scheme)
ValueError: Unsupported Sentry DSN scheme: ''
Removing PID file paster.pid

 -------------- celery@mtu.net v3.0.5 (Chiastic Slide)
---- **** ----- 

It also appears that the default port is 8000 instead of 6543 per the instructions.

mitechie commented 11 years ago

Can you paste the bookie.ini in http://paste.mitechie.com ? One of the updates from yesterday should have fixed this. All of the sentry related sections were commented out.

There's actually three services that make run starts. celery, combo loader, and the bookie app. Bookie is on :6543 while the combo loader is on :8000.

jpschewe commented 11 years ago

That would explain why I see something on port 8000. Right now I have nothing on port 6543. Ini file posted to your site.

http://paste.mitechie.com/show/912/

mitechie commented 11 years ago

Ok, check out the logging section of the sample.ini. You can either manually edit or you can rm bookie.ini and make bookie.ini to replace it from the sample.

https://github.com/mitechie/Bookie/blob/develop/sample.ini

Make sure to make stop and that you see celery and convoy stop before trying make run again.

jpschewe commented 11 years ago

That works much better.

jpschewe commented 11 years ago

I've managed to get the makefile to automatically upgrade pip, now I'm running into the following error on the current develop branch. I'll send a pull request with the changes once I can get make install to complete on my Debian system with python 2.6.


Extracting metadata from '/home/jpschewe/projects/Bookie/bookie/static/js/build/
b/view.js'
bin/python scripts/admin/first_bookmark.py
/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/engine/def
ault.py:455: SAWarning: Unicode type received non-unicode bind param value.
  param.append(processors[key](compiled_params[key]))
Traceback (most recent call last):
  File "scripts/admin/first_bookmark.py", line 31, in <module>
    tags = u'bookmarks')
  File "<string>", line 4, in __init__
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/or
m/state.py", line 200, in _initialize_instance
    return manager.original_init(*mixed[1:], **kwargs)
  File "/home/jpschewe/projects/Bookie/bookie/models/__init__.py", line 659, in 
__init__
    self.tags = TagMgr.from_string(tags)
  File "/home/jpschewe/projects/Bookie/bookie/models/__init__.py", line 134, in 
from_string
    for tag in TagMgr.find(tags=tag_list):                            [31/18137]
  File "/home/jpschewe/projects/Bookie/bookie/models/__init__.py", line 165, in 
find
    return qry.all()
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/or
m/query.py", line 2140, in all
    return list(self)
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/or
m/query.py", line 2251, in __iter__
    self.session._autoflush()
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/or
m/session.py", line 1111, in _autoflush
    self.flush()
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/or
m/session.py", line 1788, in flush
    self._flush(objects)
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/or
m/session.py", line 1870, in _flush
    flush_context.execute()
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/o
m/unitofwork.py", line 372, in execute                                [11/18137]    rec.execute(self)
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/or
m/unitofwork.py", line 525, in execute
    uow
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/or
m/persistence.py", line 63, in save_obj
    table, insert)
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/or
m/persistence.py", line 565, in _emit_insert_statements
    execute(statement, params)
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 664, in execute
    params)
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 764, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 878, in _execute_context
    context)
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 871, in _execute_context
    context)
  File "/home/jpschewe/projects/Bookie/lib/python2.6/site-packages/sqlalchemy/engine/default.py", line 320, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (IntegrityError) columns username, hash_id are not unique u'INSERT INTO bmarks (hash_id, description, extended, stored, updated, clicks, inserted_by, username, tag_str) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)' (u'c5c21717c99797', u'Bookie Website', u'Bookie Documentation Home', '2013-04-11 22:45:16.800338', None, 0, None, u'admin', '')
make: *** [first_bookmark] Error 1
mitechie commented 11 years ago

On Thu, 11 Apr 2013, Jon Schewe wrote:

I've managed to get the makefile to automatically upgrade pip, now I'm running into the following error on the current develop branch. I'll send a pull request with the changes once I can get make install to complete on my Debian system with python 2.6.

So this error is about trying to add the admin user. It creates a first user for you to use and login as. However, you've had that user already created on a previous build. You can either remove your sqlite database and rerun the make install or the process is far enough along that you should be able to just make run and go from here.

I look forward to the pull request. Thanks for keeping me up on the issues.


Rick

jpschewe commented 11 years ago

Doing "git clean -fdx" and then "make install" works.