2

Today I updated my env to python 3.8.2 Suddenly all URL strings have & rather than &.

I have tried to do the following:

import urllib.parse

params = {'pam1' : '1', 'pam2' : 2}
encoded = "https://someURL?" + urllib.parse.urlencode(params)


but the output is still the same

'https://someURL?pam1=1&pam2=2'

Is this new expected behavior? I have never encountered this and it worked fine before.

I am using the Jupyter lab.

4
  • I have tried your code and my output is someURL?pam1=1&pam2=2 as expected. If you try it on a blank jupyter workbook, do you still get this result? Commented Jun 4, 2020 at 21:18
  • Yes, I have tried it in a couple of blank notebooks I still can't get the expected result. Commented Jun 4, 2020 at 21:24
  • I do not observe this when I test this in a Python 3.8 shell, test it online python.org/shell Commented Jun 5, 2020 at 1:33
  • yes, it seems its a jupyter notebook issue. It works just fine in the shell for me too. Commented Jun 5, 2020 at 2:01

1 Answer 1

2

This is an issue with Jupyter trying to automatically convert links into clickable hyperlinks. It is fixed in more recent Jupyter version. Try to update your Jupyter installation

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.