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

Jira is not defined #1760

Open
2 of 4 tasks
Oscaner opened this issue Nov 14, 2023 · 1 comment
Open
2 of 4 tasks

Jira is not defined #1760

Oscaner opened this issue Nov 14, 2023 · 1 comment

Comments

@Oscaner
Copy link

Oscaner commented Nov 14, 2023

Bug summary

Run py script in jirashell, it's show Exception: jira is not defined, but when I use globals().update(locals()) to merge locals variables into globals, the jira client go on.
May it's a bug or not?
image

Is there an existing issue for this?

  • I have searched the existing issues

Jira Instance type

Jira Cloud (Hosted by Atlassian)

Jira instance version

No response

jira-python version

3.5.2

Python Interpreter version

3.11.6

Which operating systems have you used?

  • Linux
  • macOS
  • Windows

Reproduction steps

1. Prepare a python file `jira_export.py`, and contain `print(jira.issue)` code.
2. Run jirashell into
3. Run `with open('jira_export.py') as f: exec(f.read())`
4. Show error `Exception: jira is not defined`
5. Run `globals().update(locals())`
6. Print the jira.issue object

Stack trace

In [4]: with open('jira_export.py') as f: exec(f.read())
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
Cell In[4], line 1
----> 1 with open('jira_export.py') as f: exec(f.read())

File <string>:13

Exception: jira is not defined

In [5]: globals().update(locals())

In [6]: with open('jira_export.py') as f: exec(f.read())
issues: 0

Expected behaviour

Not throw exception.

Additional Context

No response

@adehad
Copy link
Collaborator

adehad commented Dec 25, 2023

If you could provide an example of the python file that might be easier for someone to have a look.

I haven't used the jirashell interface myself but perhaps someone else might be able to spot anything unusual in either the file or our code.

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