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

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
User avatar
Jonattend
Messages: 43
Registration: March 26, 2018 - 2:45 PM

June 2, 2020 - 4:59 PM

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. :)
WAPT Server version: 1.8.1 on Debian 10
WAPT Agent version: 1.8.1.6756
WAPT Setup version: 1.8.1.6756 on Windows10 v1909
WAPT Deploy version: 1.8.1.6756
User avatar
jpele
Messages: 156
Registration: March 4, 2019 - 12:01
Location: Nantes

June 3, 2020 - 10:07

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
User avatar
Jonattend
Messages: 43
Registration: March 26, 2018 - 2:45 PM

June 3, 2020 - 11:28

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. ;)
WAPT Server version: 1.8.1 on Debian 10
WAPT Agent version: 1.8.1.6756
WAPT Setup version: 1.8.1.6756 on Windows10 v1909
WAPT Deploy version: 1.8.1.6756
User avatar
jpele
Messages: 156
Registration: March 4, 2019 - 12:01
Location: Nantes

June 3, 2020 - 1:08 PM

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.
User avatar
Jonattend
Messages: 43
Registration: March 26, 2018 - 2:45 PM

June 3, 2020 - 3:20 PM

Hello,

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

Thank you!
WAPT Server version: 1.8.1 on Debian 10
WAPT Agent version: 1.8.1.6756
WAPT Setup version: 1.8.1.6756 on Windows10 v1909
WAPT Deploy version: 1.8.1.6756
Locked