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

UserWarning: No parser was explicitly specified #305

Open
kaldrenon opened this issue Jul 27, 2015 · 9 comments
Open

UserWarning: No parser was explicitly specified #305

kaldrenon opened this issue Jul 27, 2015 · 9 comments

Comments

@kaldrenon
Copy link

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
    beautifulsoup4-4.4.0-py2.7.egg/bs4/__init__.py:166: 
 UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser 
 for this system ("html.parser"). This usually isn't a problem, but if you run this code on
 another system, or in a different virtual environment, it may use a different parser and behave
 differently.
To get rid of this warning, change this:
 BeautifulSoup([your markup])
to this:
 BeautifulSoup([your markup], "html.parser")

Seeing this message the first time I interact with a note via Geeknote. The next several commands don't seem to show it, but later on I will get it again.

This is just a warning message, so it seems to not really be a problem, but it is a little inconvenient. Anything I can do about it?

@xsyn
Copy link

xsyn commented Aug 17, 2015

I had the same issue, which I resolved through changing editor.py:

 79         soup = BeautifulSoup(contentENML.decode('utf-8'), 'html.parser')

@yogasukma
Copy link

hi @xsyn where is editor.py? i can't find it

@xsyn
Copy link

xsyn commented Sep 16, 2015

geeknote/editor.py

@vitaly-zdanevich
Copy link

I have at line 79:

soup = BeautifulSoup(contentENML.decode('utf-8'), 'html.parser')

But I see warning when saving note.

@xsyn
Copy link

xsyn commented Oct 25, 2015

That's strange, that was the only code I changed to resolve my issue. Can you paste the error message?

@vitaly-zdanevich
Copy link

Now good - I changed originally cloned files and install again.

jeffkowalski added a commit to jeffkowalski/geeknote that referenced this issue Nov 6, 2015
Incorporate commit 2a16957,
"Explicitly call html.parser to avoid BeautifulSoup error messages."

Pulls vitalyrodnenko#331 to this branch, and addresses issue vitalyrodnenko#321 and issue vitalyrodnenko#305.
@weakish
Copy link

weakish commented Apr 17, 2016

It seems that #307 fix this.

@ghost
Copy link

ghost commented Aug 20, 2016

Thank you xsyn! Line 79 in geeknote/editor.py did the trick. That was driving me nuts! Thanks.

@saaheerpurav
Copy link

I opened editor.py and on line 0, I put 'soup = BeautifulSoup(contentENML.decode('utf-8'), 'html.parser')' and I saved the file. But now, I can't edit any python files or even open python IDLE. I removed the 'soup = BeautifulSoup(contentENML.decode('utf-8'), 'html.parser')' from editor.py, but it still doesn't work. Please Help.

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

6 participants