newbie trying to get Tank started locally

79 views
Skip to first unread message

Bill Seitz

unread,
Sep 30, 2014, 4:46:59 PM9/30/14
to tidd...@googlegroups.com
(On my Mac laptop)

Failing to import mangler - what dumb thing am I doing?


Sept29'2014: get back into it

  • since I'm not interested in Tiddly Wiki integration, I'm not installing tiddlywebwiki

    • but then how do I create an instance?

    • he says:
      • do a mkdir - I do mkdir webseitzwiki from in tank/tank

      • put a tiddlywebconfig.py inside it and edit it

      • launch by running twanager server

  • change tiddlywebconfig.py

    • I'm going to run locally on port 8086
    • GitHub OAuth setup -

    • Not going to use binaries for now, so not setting up AWS.

    • setting server_host.host to localhost

  • run
    • do twanager server from inside webseitzwiki:

      $ twanager server
      Traceback (most recent call last):
        File "/Users/billseitz/Documents/djcode/tank/bin/twanager", line 19, in <module>
          handle(args)
        File "/Users/billseitz/Documents/djcode/tank/lib/python2.6/site-packages/tiddlyweb/manage.py", line 66, in handle
          from tiddlyweb.config import config
        File "/Users/billseitz/Documents/djcode/tank/lib/python2.6/site-packages/tiddlyweb/config.py", line 221, in <module>
          read_config(config)
        File "/Users/billseitz/Documents/djcode/tank/lib/python2.6/site-packages/tiddlyweb/util.py", line 72, in read_config
          from tiddlywebconfig import config as custom_config
        File "/Users/billseitz/Documents/djcode/tank/tank/webseitzwiki/tiddlywebconfig.py", line 3, in <module>
          import mangler
      ImportError: No module named mangler

chris...@gmail.com

unread,
Sep 30, 2014, 5:42:37 PM9/30/14
to tidd...@googlegroups.com
On Tue, 30 Sep 2014, Bill Seitz wrote:

> (On my Mac laptop)
>
> Failing to import mangler - what dumb thing am I doing?

I reckon at some point I must have given you a copy of
tiddlywebconfig.py to crib from, or gave you some instructions which
weren't quite right.

The reasons for mangler's existence is to make local tiddlywebplugins
code (stuff that is not installed by pip or easy_install) available to
the current instance (or test code).

Since you'll be using a custom tiddlywebplugins.tank and will need
your own install of tiddlywebplugins.oauth, you need mangler.py.

There's a copy in the tank repo.

Put it in the directory you're calling webseitzwiki (the instance dir).
Confirm that tiddlywebconfig.py imports it.

Have a look at
https://github.com/cdent/tankdock/blob/master/runner/tiddlywebconfig.py [1]
for a recent stab at making a more automatic tiddlywebconfig.py. For
the most part it just needs changes at the top. It is designed for use
with docker (which sets some specific paths) so if you choose to
borrow this file you'll need to check for "/home/tiddlyweb" near the
end and change those to things that are meaningful for you.

But there's one more, non-obvious, thing to do.

The tiddlywebplugins.tank and tiddlywebplugins.oauth and the "src" and
"templates" dirs from the tank repo need to be symlinked into your instance
dir:

cd instancedir
ln -s /path/to/tank_source/src .
ln -s /path/to/tank_source/tiddlywebplugins .
ln -s tiddlywebplugins/templates .
cd tiddlywebplugins
ln -s /path/to/twp_oauth_source/tiddlywebplugins/oauth .

The reason for all this messing about is because Tank isn't yet
packaged for distribution, which hasn't happened because I haven't
decided how to deal with all the stuff in src. Tank does a fair bit of
wacky stuff to make it easy to develop (once over the initial set up!)
but it is neither well documented nor transparent. Probably somewhat
as a result of my plan to run Tank as a pay service (which is still a
plan but latent given all else that is going on).

If you're stuck trying to do above or you get past the above and stuck
again find me in IRC. I'm often around. When you were in there earlier
today I was out walking on the beach.

I hope this helps.

[1] TankDock might be a useful way for you to explore if you are
familiar with Docker or just want to try Tank without doing too much
experimenting. Given that you want to make changes frequently it's
probably not the best bet.

--
Chris Dent http://burningchrome.com/
[...]

Bill Seitz

unread,
Oct 2, 2014, 9:51:32 PM10/2/14
to tidd...@googlegroups.com
Chris walked me through lots of steps yesterday, which I logged on my wikilog page.

But we hit a wall when, though the tiddlyweb server would launch, we couldn't load pages because we discovered my virtualenv was using Python 2.6, and markdown requires 2.7!

I tried a bunch of steps of upgrading things today, also logged, but I'm really going to have to just throw away the old virtualenv and make a new one from scratch, and reinstall everything, right? (Plug-ins are tied to the old 2.6 inside the virtualenv, etc.)

Reply all
Reply to author
Forward
0 new messages