aesthete-team team mailing list archive
-
aesthete-team team
-
Mailing list archive
-
Message #00065
Re: Runtime failure
Interesting - I think I see what's happening there, but am surprised it
doesn't happen to us both...
At some point over summer, I split aobject (and some other fundamental
modules) off into a separate library, as they weren't very Aesthete
specific. This means, during, start-up Aesthete now tells aobject that
Aesthete is called "aesthete" before anything else happens - aobject uses
this knowledge to fill out the software details, paths and so forth when
Aesthete requests them. As such, Aesthete no longer knows anything about
its installation environment (or shouldn't), aobject covers all that.
The repeated ..'s (in aobject) are a dirty hack to get around the fact we
don't know whether aobject has been installed in a user-defined directory,
as a Python egg, or in system directory, all of which result in different
juxtaposing of the scripts and data. What it does know is the relative path
to '/share' in each of those cases, so it tries each one until it finds the
data and, from then on, appends the relative path onto the script path when
Aesthete calls aobject.paths.get_share_location().
As it was, at the start of the main script (aesthete_ime) there was
import aobject.paths as paths
paths.setup('aesthete')
However, the import was running other setup scripts (e.g.
aobject.details.setup) which needed the name to have been already set.
Anyhow, should be fixed in latest rev.
P
On Wed, Jan 11, 2012 at 2:55 PM, Chris Palmer <cpalmer@xxxxxxxxxxxxxxxxx>wrote:
> Hi all,
>
> After a long break (2, maybe 3 weeks), I'm back try to break Aesthete.
> Unfortunately it didn't take long - although I can install from the bzr
> pull, I can't run the thing. The following error message occurs:
>
> Traceback (most recent call last):
> File "/usr/bin/aesthete_ime", line 5, in <module>
> pkg_resources.run_script('**Aesthete==0.4.2', 'aesthete_ime')
> File "/usr/lib/python2.7/site-**packages/pkg_resources.py", line 499, in
> run_script
> self.require(requires)[0].run_**script(script_name, ns)
> File "/usr/lib/python2.7/site-**packages/pkg_resources.py", line 1235,
> in run_script
> execfile(script_filename, namespace, namespace)
> File "/usr/lib/python2.7/site-**packages/Aesthete-0.4.2-py2.7.**
> egg/EGG-INFO/scripts/aesthete_**ime", line 28, in <module>
> from aesthete import *
> File "/usr/lib/python2.7/site-**packages/Aesthete-0.4.2-py2.7.**egg/aesthete/__init__.py",
> line 6, in <module>
> import aobject.paths as paths
> File "/usr/lib/python2.7/site-**packages/Aesthete-0.4.2-py2.7.**egg/aesthete/aobject.py",
> line 7, in <module>
> import details
> File "/usr/lib/python2.7/site-**packages/Aesthete-0.4.2-py2.7.**egg/aesthete/details.py",
> line 37, in <module>
> setup()
> File "/usr/lib/python2.7/site-**packages/Aesthete-0.4.2-py2.7.**egg/aesthete/details.py",
> line 27, in setup
> with open(paths.get_share_location(**) + 'details/details') as
> info_file:
> IOError: [Errno 2] No such file or directory: '/usr/lib/python2.7/site-**
> packages/Aesthete-0.4.2-py2.7.**egg/aesthete/../../../../**
> share//details/details'
>
> I've traced the possible cause of the error back to aobject/paths.py, but
> can't see where to fix it (it has to be said, I'm a bit concerned about
> four ..'s in a row, which seems rather magical). Any thoughts? Or am going
> about it completely the wrong way now?
>
> Chris.
>
> --
> Mailing list: https://launchpad.net/~**aesthete-team<https://launchpad.net/%7Eaesthete-team>
> Post to : aesthete-team@lists.launchpad.**net<aesthete-team@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~**aesthete-team<https://launchpad.net/%7Eaesthete-team>
> More help : https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>
Follow ups
References