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

Python error: failed to get random numbers #1995

Closed
Rudloff opened this issue Dec 23, 2017 · 5 comments
Closed

Python error: failed to get random numbers #1995

Rudloff opened this issue Dec 23, 2017 · 5 comments

Comments

@Rudloff
Copy link

Rudloff commented Dec 23, 2017

Hello,

Since today, I get this error when I try to run C:\Python36\python.exe:

Fatal Python error: failed to get random numbers to initialize Python

It used to work correctly before.

@Rudloff
Copy link
Author

Rudloff commented Dec 23, 2017

Turns out I can't reproduce with a minimal .appveyor.yml so it must be something wrong with my setup.

(Edit: if anyone has the same issue, the Python process needs to inherit AppVeyor's environment variables to work.)

@Rudloff Rudloff closed this as completed Dec 23, 2017
@jayvdb
Copy link

jayvdb commented Oct 25, 2019

@orsinium , I guess from dephell/dephell_venvs#1 / dephell/dephell_venvs#2 that you also encountered this, and it was because of the envvar PYTHON was set?

@orsinium
Copy link

@jayvdb thank you for mentioning.

if anyone has the same issue, the Python process needs to inherit AppVeyor's environment variables to work.

That's the answer that helped me. I tried to use totally clean environment for subprocess, but it doesn't work for appveyor

https://github.com/dephell/dephell_venvs/blob/2cedadfc709ddbc3a381417f6b20e06251d62629/dephell_venvs/_builder.py#L108

@orsinium
Copy link

it was because of the envvar PYTHON was set?

No, it's because I dropped all other variables as well. I didn't discover which var exactly appveyor needs, but it's not PYTHON*

@jimporter
Copy link

For what it's worth, I ran into a similar issue on Github CI and it seems the magic environment variable you need is SYSTEMROOT. Based on this PR I found, you may only need to include SYSTEMROOT if PATH is set: AcademySoftwareFoundation/rez#775.

pavel-kirienko added a commit to OpenCyphal/pycyphal that referenced this issue Dec 30, 2020
* Remove the CLI

* Massive reorganization of the sources related to the CLI removal

* Fix the compiler test

* Improve MyPy configs

* Fix typing issues in the demo app

* Add new test for the demo in place of the old CLI-based one.

* Fix a python-3.7-specific typing issue in the demo app

* Fix mypy and add coverage

* Windows-specific fix: inherit %SYSTEMROOT% to avoid appveyor/ci#1995

* Naturally, there is no SYSTEMROOT on GNU/Linux

* Pass the PATH as well

* Final typing issues

* Remove obsolete entries from .gitignore

* Sync up the DSDL compiler with recent changes to the CLI tool

* Correct a minor enum misuse

* A weakly related change: ongoing work on CLI revealed that low send timeout values may cause issues depending on the performance of the garbage collector

* Update the demos

* Remove unnecessary copy

* Remove unnecessary runtime typing checks

* Improve error handling in transport session setup: detect and raise errors as early as possible. The old behavior was a legacy from the time when it was possible to change the local node-ID at runtime; it no longer makes sense.

* Update the heartbeat publisher to make it compatible with the case where the transport is anonymous and the output session cannot be created

* Add node test in place of the removed CLI test

* MyPy fixes

* Fix tests

* Add coverage of an important case in RedundantTransport

* Remove deprecated constructs

* Relax type in update_from_builtin()

* Update references to the command line tool per https://forum.uavcan.org/t/migrating-the-pyuavcan-cli-tool-into-a-different-package/1039/5

* Drop unused test setup 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

4 participants