Closed michael-dev2rights closed 7 years ago
(test-yamlreader) mikedd@carla /tmp> python --version Python 2.7.12
Your install is not broken. The import stanza is not right, which is your problem.
When you do
from yamlreader import ...
you hit the __init__.py
in the yamlreader
module (the folder in src/main/python
in this git repository).
This file doesn't have a __main
. It imports data_merge, yaml_load, YamlReaderError
from yamlreader.py
(using from .yamlreader import ...
) though so you could import these symbols.
If you want something from the module (yamlreader.py
as opposed to the package, yamlreader
with an __init__.py
) you need to import from the module, not from the package.
e.G. from yamlreader.yamlreader import __main
Does that make sense? Python's import syntax can be confusing and here it doesn't help that the module has the same name as the package.
If the package was named lib
you'd do from lib.yamlreader import __main
which is clearer I guess.
I'm closing this since
from yamlreader.yamlreader import __main
solves the issue. If you need more help or this didn't fix your problem, feel free to reopen!
This isn't my code. It's the yamlreader command line tool.
Unfortunately I can't reopen this issue. You need to be a repository collaborator to do that. @mriehl could you please reopen the ticket.
Oh, you're right. I totally misread the issue, sorry. I think it's just that the setuptools entry point configuration fails to fully qualify the module, I'll fix it today. Thanks for reporting.
On 17 Jan 2017, at 20:42, Michael De La Rue notifications@github.com wrote:
Unfortunately I can't reopen this issue. You need to be a repository collaborator to do that. @mriehl could you please reopen the ticket.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I've fixed it. But I don't have permissions to release on PyPI. @snordhausen could you do a release or setup travis upload?
The fixed version is now on Pypi (I bumped the version number, this made our internal build pass).
If I try installing yamlreader on my Ubuntu system into a virtualenv it fails to work properly with an install. I get the error
I'd expect a default install to work fine.
NAME="Ubuntu" VERSION="16.04.1 LTS (Xenial Xerus)"
Here's a log from the install.