brokkr / poca

A fast, multithreaded and highly customizable command line podcast client, written in Python 3
GNU General Public License v3.0
23 stars 4 forks source link

ImportError: cannot import name 'config' #100

Closed georf closed 6 years ago

georf commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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