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

Exception on metadata.version() #814

Closed
Lois31 opened this issue Nov 30, 2020 · 9 comments
Closed

Exception on metadata.version() #814

Lois31 opened this issue Nov 30, 2020 · 9 comments

Comments

@Lois31
Copy link

Lois31 commented Nov 30, 2020

Hello Team,

I am having problems with two modules: jira (v2.0.0) and jsonschema (v3.2.0).
In both cases, an exception is thrown in the init.py file on the following instructions:

jsonschema

__version__ = metadata.version("jsonschema")

jira

_v = VersionInfo('jira').semantic_version()
__version__ = _v.release_string()
version_info = _v.version_tuple()

I use Python v3.8.3

@marcelotduarte
Copy link
Owner

PR #817 is for jira issue
for now you can use --includes=cffi
python setup.py build_exe --includes=cffi

@marcelotduarte
Copy link
Owner

For me jsonschema do not throw exception. Can you put a traceback?

@marcelotduarte
Copy link
Owner

cx_Freeze 6.4.2 has just been released.
Can you check if this has been resolved?

@marcelotduarte
Copy link
Owner

@Lois31 ping

@Lois31
Copy link
Author

Lois31 commented Dec 8, 2020

For me jsonschema do not throw exception. Can you put a traceback?

Sorry for the latency ...

Traceback (most recent call last):
  File "/home/ioland/DEV/COTS/PYTHON/V3.8.3/BINARIES/Linux/lib/python3.8/site-packages/cx_Freeze/initscripts/__startup__.py", line 40, in run
    module.run()
  File "/home/ioland/DEV/COTS/PYTHON/V3.8.3/BINARIES/Linux/lib/python3.8/site-packages/cx_Freeze/initscripts/Console.py", line 37, in run
    exec(code, {'__name__': '__main__'})
  File "/home/to104437/dev/NETAPI_CODEGEN/src/codegen.py", line 20, in <module>
    from jsonschema import validate
  File "/home/ioland/DEV/COTS/PYTHON/V3.8.3/BINARIES/Linux/lib/python3.8/site-packages/jsonschema/__init__.py", line 34, in <module>
    __version__ = metadata.version("jsonschema")
  File "/home/ioland/DEV/COTS/PYTHON/V3.8.3/BINARIES/Linux/lib/python3.8/importlib/metadata.py", line 531, in version
    return distribution(distribution_name).version
  File "/home/ioland/DEV/COTS/PYTHON/V3.8.3/BINARIES/Linux/lib/python3.8/importlib/metadata.py", line 504, in distribution
    return Distribution.from_name(distribution_name)
  File "/home/ioland/DEV/COTS/PYTHON/V3.8.3/BINARIES/Linux/lib/python3.8/importlib/metadata.py", line 177, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: jsonschema

I will test with the latest version of cx_Freeze

@marcelotduarte
Copy link
Owner

@Lois31 Please test with the lasted version, 6.4.2, because this can be the error on imporlib.metadata

@Lois31
Copy link
Author

Lois31 commented Dec 8, 2020

It's works with cx_Freeze 6.4.2.

I will test with the Jira module.

@Lois31
Copy link
Author

Lois31 commented Dec 9, 2020

It also works with the Jira module.

@Lois31 Lois31 closed this as completed Dec 9, 2020
@marcelotduarte
Copy link
Owner

cx_Freeze 6.5 has just been released.

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