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

gerapy init failed complaining cannot import name 'version' #2

Closed
matifayaz opened this issue Oct 12, 2017 · 7 comments
Closed

gerapy init failed complaining cannot import name 'version' #2

matifayaz opened this issue Oct 12, 2017 · 7 comments

Comments

@matifayaz
Copy link

I've recently installed gerapy on a Python 3.6.3 virtual environment. After successful installation I executed:
gerapy init

and got this:
Traceback (most recent call last):
File "/home/muhammad/development/virtualenvs/py3-pocs/bin/gerapy", line 7, in
from gerapy.cmd import cmd
File "/home/muhammad/development/virtualenvs/py3-pocs/lib/python3.6/site-packages/gerapy/cmd/init.py", line 14, in
from gerapy import version
ImportError: cannot import name 'version'

@matifayaz matifayaz changed the title *gerapy init* failed complaining *cannot import name 'version'* gerapy init failed complaining cannot import name 'version' Oct 12, 2017
@mtaziz
Copy link

mtaziz commented Oct 12, 2017

@matifayaz, I had the same issue but I was able to run the application by doing the following:
under my site packages located in ~/projects/py36env/lib/python3.6/site-packages/gerapy
There is __init__.py and it is empty which I updated as below.
This is how version import issue resolved.

# __init__.py
__version__ = '0.7.0'
    def version():
        return __version__                     

Hope this helps.

@matifayaz
Copy link
Author

Great! Thank you Tariq. It's working now.

Do you have an idea on how can we convert the Chinese to English?

@Germey
Copy link
Member

Germey commented Oct 12, 2017

@mtaziz Thanks for your reply, I'm really appreciated.
@matifayaz I'm really sorry that I've removed the version() method from init.py because I tried to use 'VERSION' file to specify version.
Now I've fixed it and upgrade to 0.7.2
You can use upgrade or reinstall it.
I will release alpha, beta version first in the next versions in case of ERROR.
Thanks for your issue~

@Germey
Copy link
Member

Germey commented Oct 12, 2017

@matifayaz Hey, I wonder where are you from. I'm Chinese from Beijing, China. 😁 If you feel any inconvenience I'm glad to convert it in the next version.

@matifayaz
Copy link
Author

@Germey Thanks a lot for the prompt response and a quick action. I'll try after upgrading to the latest version.
I am from Pakistan :) What would be the quickest way to convert the application to English?

@mtaziz
Copy link

mtaziz commented Oct 12, 2017

@matifayaz My pleasure:)
@Germey , Thank you so much for your prompt headsup in fixing the version issue.

Despite, the fact that I contacted you over Email on how to run the application , and you responded so promptly informing about howtos and I was able to run the application but since all the button's text in UI happens to be in Chinese, I could not be able to explore on every detail of the project , at least from front-end manipulation point of view.
I very much like the Scrapy Spider Admin panel (Gerapy)/ Scrapy Spider Management Framework.

English Language Support: As you @Germey mentioned, you would love to convert it in English.
I can not thank you enough for being positive about the language conversion. I very much look forward to that.

As a matter of fact, It would have been great addition and convenience for most of the users probably around the globe if we could run the Gerapy like in both language: English -> http://localhost:8000/en and Chinese - > http://localhost:8000/ch. Meaning Gerapy would reach global audience.

I truly appreciate your effort and time in building such UI scrapy spider admin panel.
Patiently looking forward to be in touch with you as dev work goes on and would love to contribute to it within myself.

Thank you:)

@Germey Germey closed this as completed Oct 29, 2017
@Germey
Copy link
Member

Germey commented Oct 29, 2017

@mtaziz @matifayaz
Hi, English Support is finished and I'v upgrade Gerapy to 0.7.7, please upgrade it to use.
I've added Chinese/English Support, you can change the language by clicking the button in the top-right corner, and default language is English~

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

3 participants