indygreg / indygreg/PyOxidizer

Runtime error related to `pkg_resources`

Open
#675 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
6.2k
Forks
256
PR merge metrics
No merged PRs in 30d

Description

Hello 😌

> MacOS 13.1 (M1)
> PyOxidizer 0.24.0 (using the default Python distribution for my platform, i.e. 3.10.9).

After a successful build, when trying to run the resulting executable I get:

```
Traceback (most recent call last):
File "runpy", line 196, in _run_module_as_main
File "runpy", line 86, in _run_code
File "src.main", line 6, in
File "opentelemetry.exporter.otlp.proto.http.trace_exporter", line 38, in
File "opentelemetry.sdk.trace", line 58, in
File "opentelemetry.sdk.resources", line 139, in
File "pkg_resources", line 514, in get_distribution
File "pkg_resources", line 386, in get_provider
File "pkg_resources", line 956, in require
File "pkg_resources", line 815, in resolve
File "pkg_resources", line 856, in _resolve_dist
pkg_resources.DistributionNotFound: The 'opentelemetry-sdk' distribution was not found and is required by the application
error: cargo run failed
```
The issue is in a 3rd-party package, `opentelemetry-exporter-otlp-proto-http`.

I've found #378 and #236 , read the "[Support for pkg_resources](https://pyoxidizer.readthedocs.io/en/stable/oxidized_importer_resource_files.html?highlight=pkg_resources#support-for-pkg-resources)" section in the docs, and I was under the impression that it should just work (or rather, I'm not sure what to poke to make it work).

I've created a [repo that reproduces the problem](https://github.com/tatablack/pyoxidizer-issues); it's possible to just clone it and run `pyoxidizer run` to see the error.

Any suggestions or documentation pointers? I'm just trying PyOxidizer for the first time, so I can't say that I've read *all* the docs 😅

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by cloning the linked pyoxidizer-issues reproduction and running `pyoxidizer run`; compare the result with the documented “Support for pkg_resources” section and referenced issues #378 and #236. Done means determining whether this is a PyOxidizer packaging bug or a documentation/configuration gap, and recording the required guidance or change.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.