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.

Env variables no longer loaded

See original GitHub issue

OS:

 ~/  uname -srm
Linux 4.18.0-14-generic x86_64
 ~/  cat /etc/os-release
NAME="Ubuntu"
VERSION="18.10 (Cosmic Cuttlefish)"
ID=ubuntu
ID_LIKE=debian

Sublime text version:3.1.1, build 3176 Request version: v2.35.0

Ever since the update to 2.35, my env variables are not loaded. This is for both file and local env variables (i.e. even if the variables are in my .pyr file). Example:

###env
auth_token = 'some_token'
host = 'http://localhost:8080/'
default_headers = {'auth': auth_token, 'Content-Type': 'application/json'}
rest_path = host + 'some/path'
###env

get(
    rest_path + 'organization/40/folders',
    headers = default_headers,
    json = {
        "name": "A",
        "parentId": 58
    }
)

Error shown in console:

'NoneType' object has no attribute 'path'
error: PrepareRequest Error: name 'rest_path' is not defined
requests.get(
    rest_path + 'organization/40/folders',
    headers = default_headers,
    json = {
        "name": "A",
        "parentId": 58
    }…

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
YayCcommented, Apr 12, 2019

Thanks for fixing this!

I was seeing this on MacOS with Requester v2.38.0, Sublime Text build 3207, Python 3.3.6. All I had to do was restart Sublime and it started working again.

1reaction
kylebebakcommented, Mar 19, 2019

@cesuarez

I pushed a fix (2.37.1) that should hopefully deal with this problem. Can you check if this works now?

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 reasons why your .env environment variables don't work
1. Your framework doesn't automatically load .env files. ... While some frameworks and packages come built-in support for environment variables ...
Read more >
dotenv file is not loading environment variables - Stack Overflow
Be sure to load .env at the beginning of the entry file (e.g. index.js or server.js ). Sometimes, the order of execution loads...
Read more >
motdotla/dotenv: Loads environment variables from .env for ...
dotenv. Dotenv is a zero-dependency module that loads environment variables from a .env file into process.env . Storing configuration in the environment ...
Read more >
Environment Variables - Gatsby
Loading environment variables into Node.js requires a small code snippet. In development, Gatsby will load environment variables from a file named .env.
Read more >
Understanding React Native env variables - LogRocket Blog
What are env variables, and why are they useful in React Native? Learn how to create and use env variables in React Native....
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