Comments (9)
Hi. This gives very little to go off and I cannot help without more details.
Please add logs as well as more context around what stubs you are using, what device you are using, your configuration, etc.
from micropy-cli.
Hi. This gives very little to go off and I cannot help without more details. Please add logs as well as more context around what stubs you are using, what device you are using, your configuration, etc.
im using micropython-esp32-stubs and almost every other stub give "print" is not defined" and "range" is not defined" error.
im using esp32
pymakr.conf
{
"address": "192.168.4.1",
"username": "micro",
"password": "python",
"sync_folder": "src",
"open_on_start": true,
"safe_boot_on_upload": false,
"py_ignore": [
"pymakr.conf",
".vscode",
".gitignore",
".git",
"project.pymakr",
"env",
"venv",
".python-version",
".micropy/",
"micropy.json"
],
"fast_upload": false
}
from micropy-cli.
print and range are recognized after commenting out this line
"python.analysis.typeshedPaths": [".micropy\micropython_esp32_stubs-1.19.1.post13", ".micropy\BradenM-micropy-stubs-4f5a52a\frozen", ".micropy\hhhh", "typings"],
full settings.json:
{
// Loaded Stubs: micropython-esp32-stubs
"python.languageServer": "Pylance",
"python.analysis.autoSearchPath": true,
"python.autoComplete.extraPaths": [".micropy\\micropython_esp32_stubs-1.19.1.post13", ".micropy\\BradenM-micropy-stubs-4f5a52a\\frozen", ".micropy\\hhhh"],
"python.analysis.diagnosticSeverityOverrides": { "reportMissingModuleSource": "none" },
// "python.analysis.typeCheckingMode": "basic",
"python.autoComplete.typeshedPaths": [".micropy\\micropython_esp32_stubs-1.19.1.post13", ".micropy\\BradenM-micropy-stubs-4f5a52a\\frozen", ".micropy\\hhhh", "typings"],
// "python.analysis.typeshedPaths": [".micropy\\micropython_esp32_stubs-1.19.1.post13", ".micropy\\BradenM-micropy-stubs-4f5a52a\\frozen", ".micropy\\hhhh", "typings"],
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.analysis.extraPaths": [
".micropy\\micropython_esp32_stubs-1.19.1.post13",
".micropy\\BradenM-micropy-stubs-4f5a52a\\frozen",
".micropy\\hhhh"
]
}
from micropy-cli.
im getting many errors such as "Expected no arguments to "Pin" constructor"
Have you solved your problem? I have encountered the same thing.
from micropy-cli.
Instead of using esp32-micropython-1.15.0
as the stubs of my project, I switch to the following:
"stubs": {
"micropython-esp32-stubs": "1.19.1.post13",
"micropython-stdlib-stubs": "0.9.0"
}
Everything works now. But I still have other problems.
from micropy-cli.
im getting many errors such as "Expected no arguments to "Pin" constructor"
Have you solved your problem? I have encountered the same thing.
Like I mentioned comment these lines in the settings.json under the folder .vscode
For pwm error you can just type next to the error line #type: ignore
This will tell pylance to ignore the error.
It's not a perfect solution but it's a start, until now the creators of this resp. didn't reply again even after I provided the info they asked for.
from micropy-cli.
Instead of using
esp32-micropython-1.15.0
as the stubs of my project, I switch to the following:"stubs": { "micropython-esp32-stubs": "1.19.1.post13", "micropython-stdlib-stubs": "0.9.0" }Everything works now. But I still have other problems.
Can you use multiple stubs in one project?
from micropy-cli.
im getting many errors such as "Expected no arguments to "Pin" constructor"
Have you solved your problem? I have encountered the same thing.
this is the fix, frequency is not positional argument but a keyword one
from micropy-cli.
sorry for the mistake i just had to use a keyword argument for the frequency not a positional argument
from micropy-cli.
Related Issues (20)
- MicroPy-CLI Crashing during stubs creation HOT 3
- "int", "str", "bytes", etc. not defined HOT 4
- Feature for Vim autocomplete HOT 2
- README + Documentation Updates
- TypeError while generating stubs from board via USB HOT 15
- stubs create process get stuck but won't give any errors HOT 6
- VSCode/Pylint configurations failing with more recent versions of VSCode/Pylance
- micropy stubs create fails after verifying integrity HOT 4
- vscode missing imports after creating project HOT 4
- Problem after updating to the latest version HOT 3
- micropy_cli stubs create fails on win 11 HOT 1
- micropy-cli syntax problem ? (i am not sure) HOT 1
- all files have been uploaded to board HOT 1
- E ModuleNotFoundError: No module named 'requirements' HOT 3
- Import "bluetooth" could not be resolved HOT 1
- Unable to install netifaces HOT 1
- stubs add in VSC on Windows tries to access github but is acting like it is a local file path
- ModuleNotFoundError: No module named 'imp' HOT 1
- Create stubs spits out ValueError HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micropy-cli.