Since upgrading to 0.54 release VStudio Code has been underlining all of the widget method calls and giving the warning “No value for argument ‘body’ in method call pylint(no-value-for-parameter)”. This happens for all streamlit method calls except for st.write.
Any suggestions on how to resolve this?
For example:
this is fine:
st.write(‘some text’)
st is underlined with error as described above:
st.header(‘some header’)
st.sidebar.markdown(‘settings…’)
Hi guys,
Looking at this PR, I see that it has been merged in mid Feb. I am still seeing this issue with VSCode today in May. I am using version 0.60.0. I am not sure if this just on my end or if this fix has made it into the 0.60.0 release. Appreciate the help.
Thanks for the heads up, I’ll push this to the eng team. Thanks @Raghav_Khullar for the GH issue btw.
Can reproduce it with pylint. @pymagnit@nicolasdaviaud@Sesostrismage can you confirm the underlined error comes from pylint ? You can check that on the bottom of VSCode there should be a circled x you can click on and see if it’s a pylint(no-value-for-parameter).
As a workaround for the time being, disabling linting and only relying on the IDE’s settings looks good for me. You can also add # pylint: disable=E1120 at the top of your script to disable the warning.
@andfanilo somehow I stoped getting this error! I installed streamlit on a different environment and the issue did not occur. The original environment had some other issues. I think it was probably on my end.
I continue to have this annoying “red-underline” widgets issue with VS Code in Streamlit 0.74.1. The issue goes away when including the following line in the settings.json: “python.linting.pylintEnabled”: false,", or disabling Linting from the command palette, but I hate turning this off – functionality is lost.
I like VS Code but I’m wondering if I should switch to Sublime – something that works properly? Any recommendations on this?
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.