Re: [Bots Open Source EDI Translator] Bots & Python 3

694 views
Skip to first unread message

Klaas Feenstra

unread,
Apr 9, 2021, 9:51:28 AM4/9/21
to bots...@googlegroups.com
Hi Mike and Henk Jan,

Could you find the way to make it installable with PIP? Is it possible to put the code on sourceforge, so we can test it also?

Kind regards,

Klaas

On Wed, Mar 17, 2021 at 12:50 AM aoplnx <aop...@gmail.com> wrote:
Hi BikeMike

Follow your advise and convert all python2 program to python3. I installed all the other tools that you mention in your bots 4.0 picture.
I am getting the below issues. Can you share your thoughts or input to help me to fix the below issues:
(virtualenv_EDI40) [andres@aoplnx1 bin]$ bots-webserver.py
Traceback (most recent call last):
  File "/home/andres/virtualenv_EDI40/bin/bots-webserver.py", line 2, in <module>
    from bots import webserver
  File "/home/andres/virtualenv_EDI40/lib/python3.9/site-packages/bots/webserver.py", line 8, in <module>
    from cherrypy import wsgiserver
ImportError: cannot import name 'wsgiserver' from 'cherrypy' (/home/andres/virtualenv_EDI40/lib/python3.9/site-packages/CherryPy-18.6.1.dev49+g98929b51-py3.9.egg/cherrypy/__init__.py)

Any help or hint will be appreciated.

Regards

aoplnx


On Wednesday, February 17, 2021 at 4:51:52 PM UTC-5 BikeMike wrote:
I'm also not sure how to package distributables. To be honest, even though I use windows, I don't use the windows installer. I just create virtual environments and unzip/install manually.
Probably would be best to make it installable via pip. I will research this a bit.

Klaas, yes the codelist upload/download has been included in enhancements.

On Wednesday, 17 February 2021 at 21:49:13 UTC+10:30 eppye wrote:
can you do me a favour and update way to make new distributables?
a lot has chagned there, and this was always very troublesome.
seems that python has improved here, but I am not sure.


kind regards, Henk-Jan Ebbers


On Wed, Feb 17, 2021 at 12:05 PM Klaas Feenstra <kl...@feenstra.es> wrote:
One suggestion. Your code for up and downloading codelists is very useful, I have it in my actual Bots version and would like that this would be included in the standard. 

On Wed, Feb 17, 2021 at 12:01 PM Klaas Feenstra <kl...@feenstra.es> wrote:
Hi Mike,

You are not the first mis-spelling my name. Thanks for the update. Hopefully I can test the new version soon. When do you think a beta version will be available?

Thanks,

Klaas

On Tue, Feb 16, 2021 at 12:59 PM BikeMike <mjg...@gmail.com> wrote:
Sorry Klaas, for mis-spelling your name :-)

On Tuesday, 16 February 2021 at 22:25:46 UTC+10:30 BikeMike wrote:
Hi Klass,
Tonight I got latest release of Django running. Still need to test more but seems all ok.
Most of the code changes needed were in models, with a few in forms and urls. Also I need to check for any template changes needed.
Regards,
Mike

2021-02-16 22_05_09-Bots4.0_home — Mozilla Firefox.png

On Thursday, 11 February 2021 at 20:54:27 UTC+10:30 Klaas Feenstra wrote:
Hi Mike,

thanks for the update. It's totally acceptable to make it not backward compatible with Python2 as this version is not supported anymore. I would like that also the Django version was updated to the latest LT version. Oldest supported Django version is  2.2.18. Hopefully this will not need the same efforts in updating as the version update from python2 to python3.

Thanks both to you Henk Jan en Mike! 

On Thu, Feb 11, 2021 at 5:32 AM BikeMike <mjg...@gmail.com> wrote:
I hope Henk-Jan does not mind me providing an update here, I have been helping with some changes.

I have a running, but not yet well tested version on Python 3.9 64 bit.
I have tried a range of scenarios, from passthrough, basic and complex mappings, preprocessing routescripts, customized communicationscripts, even RFC connections to SAP. So far, so good.

You will need to convert and review/test all of your grammars, mappings and other scripts for python 3 compatibility. I have found the 2to3 utility fixes most things.
Routescripts using botslib.opendata or readdata (eg. pre- and post-processing) need to provide encoding parameter
Communicationscripts may also need review depending on what they do. if subclassing from communication.py, then check there for code changes. bytes/strings will bite you here (pun intended)

I think 3.9 should be be the recommended Python version, but it might work on earlier 3.x versions depending on other library support.  There will likely not be a combined python 2/3 version due to the significant changes with str/bytes/unicode and handling these things is really at the core of what Bots does.
Django recommended will be 1.9.x, should work with 1.8.x (2.0+ may come later)
Paramiko 2.0+ required for sftp, removes pycrypto dependency (& vulnerabilities)
CherryPy latest version should be used (again to eliminate vulnerabilities)

TODO for me:
MySQL compatibility
Uplift some of my functional enhancements
Test, Test, Test

Henk-jan will be in control to incorporate changes, test, and determine when ready to release.
Probably this should be called Bots 4.0 since there are such major backwards-incompatible changes

Kind Regards,
Mike



On Tuesday, 9 February 2021 at 08:32:21 UTC+10:30 Klaas Feenstra wrote:
Hi Henk Jan,

I am a very happy user of Bots. I think many of us are hoping that the new Python 3 version of Bots is coming soon. Can you give us a latest update? Thanks,

Klaas

Op vrijdag 11 september 2020 om 16:52:14 UTC+2 schreef eppye:
not there yet.

kind regards, Henk-Jan Ebbers


On Fri, Sep 11, 2020 at 4:30 PM Alexander <alexand...@complavis.de> wrote:
Hi Henk-Jan,

is there a work in progress version of Bots for Python 3 available e.g. in a GitHub repository?
I would like to check it out and start adjusting my scripts and developed extensions to work with the new version.

Looking forward to a reply.
Thanks.

Best regards
Alex

--
You received this message because you are subscribed to the Google Groups "Bots Open Source EDI Translator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to botsmail+u...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Bots Open Source EDI Translator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to botsmail+u...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Bots Open Source EDI Translator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to botsmail+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/botsmail/e024019f-a9df-4008-b87d-cef5ad5bfd87n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Bots Open Source EDI Translator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to botsmail+u...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Bots Open Source EDI Translator" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/botsmail/bJlr5IpJMko/unsubscribe.
To unsubscribe from this group and all its topics, send an email to botsmail+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/botsmail/0f40e3ea-75f8-4589-a98d-9f967be26815n%40googlegroups.com.

John Freeman

unread,
Jul 1, 2021, 10:08:43 AM7/1/21
to Bots Open Source EDI Translator
Any update on the python3 version of BOTS.

Eppye Bots

unread,
Jul 2, 2021, 5:22:57 AM7/2/21
to 'Chuck Turco' via Bots Open Source EDI Translator
not there yet.

kind regards, Henk-Jan Ebbers


alex.mo...@gmail.com

unread,
Dec 1, 2022, 12:47:36 PM12/1/22
to Bots Open Source EDI Translator
Hello all, 
Especially Klaas, I am encountering the same problem as you, until now I only used BOTS on Windows but now I have a client that needs it installed on Linux and I'm not very experienced.
I installed all the dependencies and BOTS and I tried starting the webserver but I get this error:
Traceback (most recent call last):
  File "/usr/bin/bots-webserver.py", line 2, in <module>
    from bots import webserver
  File "/usr/lib/python2.7/site-packages/bots/webserver.py", line 8, in <module>
    from cherrypy import wsgiserver

I am not sure what I need to do now, any help would be appreciated.

Thanks,
Alex

Hans

unread,
Dec 2, 2022, 5:27:47 AM12/2/22
to Bots Open Source EDI Translator
Hi Alex,

We get several BOTS servers on Ubuntu 16 (high is not supported as far as my knowledge goes).
these are the commands te install bots with dependencies.


sudo apt install python-minimal

sudo apt install build-essential
sudo apt install mysql-client
pip install MySQL-python

curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py

sudo pip install Django==1.7.11
sudo pip install CherryPy==7.1.0
sudo pip install requests==2.13.0
sudo pip install genshi==0.7

pip install paramiko
pip install pyinotify
pip install xlrd

wget https://www.bytereef.org/software/mpdecimal/releases/cdecimal-2.3.tar.gz
tar xvzf cdecimal-2.3.tar.gz
cd cdecimal-2.3
sudo python setup.py install

https://sourceforge.net/projects/bots/files/bots%20open%20source%20edi%20software/3.2.0/bots-3.2.0.tar.gz/download
tar -xf bots-3.2.0.tar.gz
cd bots-3.2.0
sudo python setup.py install
sudo chown -R *ubuntuser* /usr/local/lib/python2.7/dist-packages/bots

Op donderdag 1 december 2022 om 18:47:36 UTC+1 schreef alex.mo...@gmail.com:
Reply all
Reply to author
Forward
0 new messages