question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[DOCs] NameError: global name '__jid__' is not defined

See original GitHub issue

Description

the __jid__ is not available in execution module:

def test():
    return __jid__

this should be available: https://docs.saltstack.com/en/master/topics/development/modules/developing.html#additional-globals Versions Report

salt --versions-report
Salt Version:
           Salt: 3000.3
 
Dependency Versions:
           cffi: 0.8.6
       cherrypy: unknown
       dateutil: 2.2
      docker-py: Not Installed
          gitdb: 0.5.4
      gitpython: 0.3.2 RC1
         Jinja2: 2.10
        libgit2: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: 1.2.3
      pycparser: 2.10
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.9 (default, Sep 14 2019, 20:00:08)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 14.4.0
          smmap: 0.8.2
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.0.5

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
terminalmagecommented, Jul 11, 2020

I have opened https://github.com/saltstack/salt/pull/57911 to remove the incorrect documentation.

0reactions
terminalmagecommented, Jul 11, 2020

This is not a bug, this is just bad documentation, written based on an incorrect understanding of the code. These values are not, and have never been globals added by the loader. They are values that are added to each low chunk when running a job, and they are used by things like the state compiler.

Here is the original PR which introduced this documentation. Note that this is documenting code within the client, not within the loader. For these to be global dunder values, they would have to be present within the pack attribute of a LazyLoader instance, because the keys/values in the pack dict are what are added as module globals (see here).

Read more comments on GitHub >

github_iconTop Results From Across the Web

NameError: global name 'requests' is not defined · Issue #55604
head' are run, the minion returns saying that "global name 'requests' is not defined". I have two other minions running the same version...
Read more >
NameError: global name is not defined - python - Stack Overflow
You need to do: import sqlitedbx def main(): db = sqlitedbx.SqliteDBzz() db.connect() if __name__ == "__main__": main().
Read more >
type 'exceptions.NameError' global name is not defined
Hi, I'm new to web.py and have been struggling with this problem for the past day. I hope someone can point me to...
Read more >
NameError: global name 'openFile' is not defined - SourceForge
Hi Elodie,. I believe that PyTables has been updated version 3 has breaking API changes to the version I used to develop CoNIFER....
Read more >
Messages ING001I to INGY1337I - IBM
The variable name shows the name of the system where the command could not be processed. System action. Processing is terminated. Operator response....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found