Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'config' #100

Closed
georf opened this issue Nov 21, 2017 · 5 comments
Closed

ImportError: cannot import name 'config' #100

georf opened this issue Nov 21, 2017 · 5 comments

Comments

@georf
Copy link

georf commented Nov 21, 2017

Hello, it's me again.

I got another error. Is it my fault this time?

$ poca-subscribe 
Traceback (most recent call last):
  File "/usr/local/bin/poca-subscribe", line 14, in <module>
    import poca
  File "/usr/local/lib/python3.4/dist-packages/poca/__init__.py", line 16, in <module>
    from . import subupdate
  File "/usr/local/lib/python3.4/dist-packages/poca/subupdate.py", line 21, in <module>
    from poca.config import merge
  File "/usr/local/lib/python3.4/dist-packages/poca/config.py", line 16, in <module>
    from poca import files, output, xmlconf
  File "/usr/local/lib/python3.4/dist-packages/poca/xmlconf.py", line 17, in <module>
    from poca.subscribe import pretty_print
  File "/usr/local/lib/python3.4/dist-packages/poca/subscribe.py", line 26, in <module>
    from poca import files, output, config, outcome
ImportError: cannot import name 'config'

I tested it with the version 1.0b6.

@brokkr
Copy link
Owner

brokkr commented Nov 21, 2017

Hi Georf,

Thanks for letting me know. To answer your question: Most probably not :) Things got a bit hairy last night and I have been doing a lot more restructuring at this late stage than I would really have liked.

However, I am unable to reproduce it and the traceback looks... odd. Can I ask if you installed it straight from pip or 'by hand'? If the latter, can I ask you to try installing from pip and see if it persists?

EDIT: actually forget that, that should not make any difference. There is only one commit that has beta6 on it and that's the latest so there can be no doubt as to what code you're running.

@brokkr
Copy link
Owner

brokkr commented Nov 21, 2017

Instead can I ask you to

  1. tell me if you get the same error when just running poca or is it specific to poca-subscribe?
  2. tell me if you get the same error if you use a freshly created config dir?

@brokkr
Copy link
Owner

brokkr commented Nov 21, 2017

I have tried to move the config.merge into it's own submodule based on nothing but a hunch. You can try upgrading to beta7 (for the time being only on github not on pypi) but I don't have high hopes.

I'm going to dig in to it tomorrow and hopefully get my own python 3.2./3.4 environments up and running so I can see if it's related to version numbers.

@brokkr
Copy link
Owner

brokkr commented Nov 22, 2017

Hi Georf,

I ran debian 8 (jessie) in a virtual machine to get a python 3.4 environment like yours and I'm still unable to reproduce the error you're seeing. I can't get anything going in 3.2 on debian 7 so I guess that 3.4 is a hard requirement.

Now, the move from before-beta6 to beta6 involved renaming stuff that can easily get messy (essentially src/poca used to be a file, now it's directory) I don't know how well git handles that sort of thing if you're just fast-forwarding. I know I had to break it up into small steps when merging my branch into master.

So I would suggest uninstalling completely, force-deleting the cloned directory and install fresh, either by cloning anew of by using pip3 install poca. [EDIT: This should get you beta8 as of now]

If this works for you, I will include these instructions in the notes on upgrading from before 1.0. Thanks again for all your help.

@georf
Copy link
Author

georf commented Nov 22, 2017

I tried it with beta8 and it works. Thank you very much. I will test poca now with all my podcasts.

@georf georf closed this as completed Nov 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants