Giter VIP home page Giter VIP logo

Comments (9)

BradenM avatar BradenM commented on May 24, 2024

@Mrqozy,

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.

Mrqozy avatar Mrqozy commented on May 24, 2024

@Mrqozy,

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
}

image

from micropy-cli.

Mrqozy avatar Mrqozy commented on May 24, 2024

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.

UchihaYuki avatar UchihaYuki commented on May 24, 2024

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.

UchihaYuki avatar UchihaYuki commented on May 24, 2024

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.

Mrqozy avatar Mrqozy commented on May 24, 2024

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.

Mrqozy avatar Mrqozy commented on May 24, 2024

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.

Mrqozy avatar Mrqozy commented on May 24, 2024

im getting many errors such as "Expected no arguments to "Pin" constructor"

Have you solved your problem? I have encountered the same thing.

image
this is the fix, frequency is not positional argument but a keyword one

from micropy-cli.

Mrqozy avatar Mrqozy commented on May 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.