Code Monkey home page Code Monkey logo

Comments (8)

princenyeche avatar princenyeche commented on June 18, 2024

If you have python 3.6.x and above installed, then you will need to be on python shell on your terminal to run that command.

your_user@you~% python
Type "help", "copyright", "credits" or "license" for more information.
>>> from jiraone import LOGIN, USER
>>>

from jiraone.

aubreyskingdom avatar aubreyskingdom commented on June 18, 2024

Thanks for the quick response. If I'm in the python shell I'm still getting an error:
Python 3.9.5 (default, May 3 2021, 19:12:05)
[Clang 12.0.5 (clang-1205.0.22.9)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

from jiraone import LOGIN, USER
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'jiraone'

So then I thought I should install jiraone within the python shell and this is the result:

pip install jiraone
File "", line 1
pip install jiraone
^
SyntaxError: invalid syntax

from jiraone.

princenyeche avatar princenyeche commented on June 18, 2024

I believe you need to install virtual environment first to do that

your_user@you~% python -m virtualenv venv

cd into the directory of your venv and activate it. You might be asked to upgrade pip and virtualenv, please follow your screen prompt to do that.

your_user@you~% source venv/bin/activate
(venv)your_user@you~% pip install jiraone
(venv)your_user@you~% python
Type "help", "copyright", "credits" or "license" for more information.
>>>

from jiraone.

princenyeche avatar princenyeche commented on June 18, 2024

Hey @aubreyskingdom
How did your configuration go?

from jiraone.

aubreyskingdom avatar aubreyskingdom commented on June 18, 2024

I've made a lot of progress! I was able to get into the virtual environment successfully and configure my login info. I am testing the usage of this by running this:
if name == 'main':
# the output of the file would be absolute to the directory where this python file is being executed from
USER.get_all_users(pull="active", user_type="atlassian", file="user_file.csv")

and this is the result I'm getting:
Current Record - At Row 50
Current Record - At Row 100
Current Record - At Row 150
Current Record - At Row 200
Traceback (most recent call last):
File "", line 3, in
File "/opt/homebrew/lib/python3.9/site-packages/jiraone/reporting.py", line 1139, in get_all_users
self.report(category=folder, filename=file)
File "/opt/homebrew/lib/python3.9/site-packages/jiraone/reporting.py", line 1144, in report
file_writer(folder=category, file_name=filename, data=read, mark="many")
File "/opt/homebrew/lib/python3.9/site-packages/jiraone/reporting.py", line 1265, in file_writer
file = path_builder(path=folder, file_name=file_name)
File "/opt/homebrew/lib/python3.9/site-packages/jiraone/reporting.py", line 1254, in path_builder
base_dir = os.path.join(WORK_PATH, path)
File "/opt/homebrew/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/posixpath.py", line 90, in join
genericpath._check_arg_types('join', a, *p)
File "/opt/homebrew/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/genericpath.py", line 152, in _check_arg_types
raise TypeError(f'{funcname}() argument must be str, bytes, or '
TypeError: join() argument must be str, bytes, or os.PathLike object, not '_SpecialForm'

from jiraone.

princenyeche avatar princenyeche commented on June 18, 2024

Hey @aubreyskingdom
I think the problem might be with the path to the file. Can you try the below by adding the folder path

USER.get_all_users(pull="active", user_type="atlassian", file="user_file.csv", folder="Test_Folder")

from jiraone.

princenyeche avatar princenyeche commented on June 18, 2024

Hi @aubreyskingdom
Hope the above helps!

from jiraone.

princenyeche avatar princenyeche commented on June 18, 2024

If all is okay, I will be closing off this issue.

from jiraone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.