indygreg / indygreg/PyOxidizer

Certifi Error ( __file__ ) not defined

Open
#73 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

compatibility
Dominant language
Rust
Stars
6.2k
Forks
256
PR merge metrics
No merged PRs in 30d

Description

pyapp packaged into /pyapp/build/apps/pyapp/debug
Traceback (most recent call last):
File "importlib.util", line 94, in find_spec
File "dpt_installer", line 12, in
File "requests", line 112, in
File "requests.utils", line 39, in
File "certifi.core", line 13, in where
NameError: name '__file__' is not defined

how to solve this problem?
it says can't find module certifi, but with certifi included, it throughs an error

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the packaged /pyapp/build/apps/pyapp/debug traceback and inspect importlib.util, dpt_installer, requests.utils, and certifi.core in that order. Reproduce the bundled import and determine why certifi.core receives no __file__; done means certifi and requests import successfully in the packaged application.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.