question

Upvotes
Accepted
25 1 2 1

If copy sample python code from articles, &nbsps added

https://developers.refinitiv.com/en/article-catalog/article/instrument-pricing-analytics-volatility-surfaces-and-curves - for example, if I try copy code from this article and put it to my IDEA, nbsp symbols (white spaces) added, which are not accepted for python style code. for me, and I assume for other users, it's not convenient to remove all nbsp after every copy peace of the code.

pythonhtml
1610924049402.png (100.8 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
24.5k 86 10 22

Hi @stepan.kalika

Can you please confirm which IDE you are using so I can discuss with the website development team?

In the meantime, you can access the full source code for the Jupyter Notebook on GitHub. The link can be found on the right-hand side at the start of the article.

Refinitiv-API-Samples/Article.RDPLibrary.Python.VolatilitySurfaces_Curves: Create & Plot ETI and FX Volatility Surfaces, Smile Curves, Term Structures, Forward Curves and more using Instrument Pricing Analytics Data and the Refinitiv Data Platform Library (github.com)


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
25 1 2 1

thanks for GitHub link. I'm using 2 IDEs: PyCharm, Visual Studio Code

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks @stepan.kalika

I can recreate in PyCharm and VS Code.

I have reported this issue to the Dev Portal development team.

yes, i can confirm i see this issue in both VS Code and PyCharm. but not matter which IDE use, the issue still presents. the screnshot below is from VS Code:

1610972283416.png (53.7 KiB)
Upvotes
28.9k 32 11 15

Hello @stepan.kalika and @umer.nalla ,

Could you please confirm on your side, if you are still seeing this issue?

From my testing, the issue looks to be fixed:

  • If I press "Copy" link at the bottom right of the code segment, the code consequently pastes into IDE "as is".
  • If however I highlight and then copy, a lot of white spaces also get consequently pasted with the code.

Thanks

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
15.1k 28 8 12

Please be informed that the copy code example issue(s) has been fixed.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Yes, it has been fixed. Thanks.