[Outreachy] Setting up development envirenment
Hi Sofia! I have made myself familiar with the launchpad, storyboard and gerrit. I have also experimented in the Sandbox projects. I was trying to set up my development environment following https://docs.openstack.org/cinder/latest/contributor/development.environment... but I was unable to run unit tests, on running command 'tox -e py3' I get error saying AttributeError: module 'py' has no attribute 'io' Kindly help me with this so that I can start working on my first issue :) Thank you!
👋 Hi, I think you clone the cinder repository and try to run tox. Have you install tox? https://pypi.org/project/tox/ If you installed tox and this seeing a error: Please copy and paste the full error on https://paste.openstack.org/ and share the link here. Cheers, Sofia El El sáb, 11 mar 2023 a las 21:26, Khadija <kamrankhadijadj@gmail.com> escribió:
Hi Sofia! I have made myself familiar with the launchpad, storyboard and gerrit. I have also experimented in the Sandbox projects. I was trying to set up my development environment following https://docs.openstack.org/cinder/latest/contributor/development.environment... but I was unable to run unit tests, on running command 'tox -e py3' I get error saying AttributeError: module 'py' has no attribute 'io' Kindly help me with this so that I can start working on my first issue :) Thank you!
-- Sofia Enriquez
On Sat, Mar 11, 2023 at 10:28:33PM +0000, Sofia Enriquez wrote:
👋 Hi,
I think you clone the cinder repository and try to run tox. Have you install tox? https://pypi.org/project/tox/
If you installed tox and this seeing a error: Please copy and paste the full error on https://paste.openstack.org/ and share the link here.
Cheers, Sofia
Hey Sofia! Yes I have installed tox. Here is the link to the error: https://paste.openstack.org/show/bQBHKrMiphG75uWHjkRj/ Kindly look into this. Thank you for your time :)
El El sáb, 11 mar 2023 a las 21:26, Khadija <kamrankhadijadj@gmail.com> escribió:
Hi Sofia! I have made myself familiar with the launchpad, storyboard and gerrit. I have also experimented in the Sandbox projects. I was trying to set up my development environment following https://docs.openstack.org/cinder/latest/contributor/development.environment... but I was unable to run unit tests, on running command 'tox -e py3' I get error saying AttributeError: module 'py' has no attribute 'io' Kindly help me with this so that I can start working on my first issue :) Thank you!
-- Sofia Enriquez
On 2023-03-12 18:30:34 +0500 (+0500), Khadija Kamran wrote: [...]
Yes I have installed tox. Here is the link to the error: https://paste.openstack.org/show/bQBHKrMiphG75uWHjkRj/ Kindly look into this. [...]
Based on the slew of bug reports I found, this looks like an incompatibility between the latest versions of tox and pytest. Unfortunately there's a lot of finger-pointing, and the suggestions from their respective upstreams are to either uninstall one of the two packages, or pin one of them to an older version, or use an isolated environment such as a venv instead of using `sudo pip install ...` in the system Python's context. You could try one of the following: sudo pip install tox py sudo pip install tox 'pytest<7.2' sudo pip uninstall pytest ; sudo pip install tox Ultimately, though, we should be teaching people to install and run tox and similar tools with their distribution package manager or in a venv rather than running `sudo pip install ...` since PEP 668 is starting to disallow that workflow on newer platforms anyway. -- Jeremy Stanley
Hey Jeremy! Thank you for the reply. I have tried all the above commands and it still doesn't seem to work. Also, I am using PyCharm with a venv using python3.9 Regards, Khadija
On 2023-03-12 19:10:44 +0500 (+0500), Khadija Kamran wrote: [...]
I have tried all the above commands and it still doesn't seem to work.
By "doesn't work" do you mean you get the exact same error message, or did you get different errors?
Also, I am using PyCharm with a venv using python3.9
I don't know much about PyCharm (someone with more familiarity would need to chime in on how it might influence this situation, if at all), but if you're using `sudo pip install tox` as indicated in your earlier paste then that's definitely not installing tox into a venv of any kind, as evidenced by the traceback you pasted referencing modules in /usr/lib/python3.10 instead of a venv path. -- Jeremy Stanley
On Sun, Mar 12, 2023 at 02:20:18PM +0000, Jeremy Stanley wrote:
On 2023-03-12 19:10:44 +0500 (+0500), Khadija Kamran wrote: [...]
I have tried all the above commands and it still doesn't seem to work.
Hi Jeremy, The command runs successfully now. Yes, I was getting the exact same errors. But it worked when I restarted the IDE. Thank you for your time. Regards, Khadija
By "doesn't work" do you mean you get the exact same error message, or did you get different errors?
Also, I am using PyCharm with a venv using python3.9
I don't know much about PyCharm (someone with more familiarity would need to chime in on how it might influence this situation, if at all), but if you're using `sudo pip install tox` as indicated in your earlier paste then that's definitely not installing tox into a venv of any kind, as evidenced by the traceback you pasted referencing modules in /usr/lib/python3.10 instead of a venv path. -- Jeremy Stanley
participants (4)
-
Jeremy Stanley
-
Khadija
-
Khadija Kamran
-
Sofia Enriquez