Page 1 of 1

[SOLVED] WAPT 1.8 & PyScripter: No module named BeautifulSoup

Published: June 2, 2020 - 4:59 PM
by Jonattend
Hello,

I just successfully migrated my WAPT Community server from version 1.7 to 1.8.1.6756.

I then decided to update some packages... and I noticed that all packages using the BeautifulSoup are no longer valid for updating their source code (CTRL+F9 from setup.py).

For example, for the Java8 and Flash packages, when I run update_sources(), PyScripter returns the following error: "ImportError: No module named BeautifulSoup".

I've tried various things, such as importing it at the beginning of setup.py (import bs4), but nothing has worked.

The console is running on Windows 10 x64 1903 with the latest version of PyScripter available on the WAPT store (I installed the waptdev package).

I checked the path used in PyScripter: it correctly points to version 2.7 (32-bit) located in C:\Program Files (x86)\wapt.

Could this problem be caused by the new WAPT version 1.8? I never had any issues with any Python module in PyScripter in version 1.7...

Thank you for your help. :)

Re: WAPT 1.8 & PyScripter: No module named BeautifulSoup

Published: June 3, 2020 - 10:07 AM
by jpele
Good morning,

If you need to manually update your older packages, you will indeed need to include this code snippet for dual compatibility. The problem has been occurring since the update to BS4.

Code: Select all

try:
    import bs4 as BeautifulSoup
except:
    import BeautifulSoup
For the packages you mentioned, you can find examples here:
https://store.wapt.fr/store/tis-oracle- ... re-nonfree
https://store.wapt.fr/store/tis-flashplayer


Sincerely,
Jimmy

Re: WAPT 1.8 & PyScripter: No module named BeautifulSoup

Published: June 3, 2020 - 11:28 AM
by Jonattend
Hello,
thank you for the reply. ;)
I wasn't far off regarding the bs4 module...
So, for all my packages using bs4, I'll have to integrate this bit of code at the beginning of the setup.py file?

If so, I'll test it right away with Java/Flash and get back to you. ;)

Re: WAPT 1.8 & PyScripter: No module named BeautifulSoup

Published: June 3, 2020 - 1:08 PM
by jpele
Jonattend wrote: June 3, 2020 - 11:28 AM Hello
, Thank you for the reply. ;)
I wasn't far off regarding the bs4 module...
So, for all my packages using bs4, I'll have to integrate this bit of code at the beginning of setup.py?

If so, I'll try it right away with Java/Flash and give feedback. ;)
Yes, absolutely, or re-import the packages from the store that have already been updated.

Re: WAPT 1.8 & PyScripter: No module named BeautifulSoup

Published: June 3, 2020 - 3:20 PM
by Jonattend
Hello,

thank you for your help as it solved the problem. ;)

Thank you!