bots-edi / bots Goto Github PK
View Code? Open in Web Editor NEWThis project forked from eppye-bots/bots
Bots EDI Translator
License: GNU General Public License v3.0
This project forked from eppye-bots/bots
Bots EDI Translator
License: GNU General Public License v3.0
I have OCD.
The root of the bots repo has way too much stuff in there. My initial thought is to create a subdirectory like /scripts to dump most of the build and execution scripts. I don't want to do that blindly though, so might have to take some time to test that. I haven't done much with running the build scripts lately, and for now it seems like scripts should remain working as they are.
I've started downloading some of this stuff, but its a real PITA for a lot of reasons.
Anyhow, there's some good stuff here: https://sourceforge.net/projects/bots/files/
These should go in one or more repos.
Like I said, I got a start on grabbing files, but still have to organize and publish them. Just wanted to mention it...
Hello
We hit a problem in production, we wanted to keep 3 day of empty run (for week end analysis) and set hoursrunwithoutresultiskept at 72
And we ended with nothing purge
After a quick lookup at cleanup.py, I'v seen that the function _cleanrunsnothingreceived() do not purge entry older than 25h
It will be better to replace :
onlycheckrunsofoneday = datetime.datetime.today() - datetime.timedelta(hours=25)
By :
onlycheckrunsofoneday = datetime.datetime.today() - datetime.timedelta(hours=(botsglobal.ini.getint('settings','hoursrunwithoutresultiskept',1)+1))
When pulling a reference value from the transaction's ta_info
reading, the ISA-ISA13
value (ISA transaction control number value) is overwritten by bots making it very difficult to access from originating envelope.
This should be fixed to the reference
value for incoming files and refer to the table value in out
transaction for the unique key created by the hash of ISA-ISA06
and ISA-ISA08
.
Pyroma is a tool to check the setup.py of a python-projects.
It gives you hints about what can be improved.
see https://pypi.python.org/pypi/pyroma/
Create this:
http://skilchen.github.io/bots/
At this URL:
http://bots-edi.github.io
I plan to take a look at this. Please add feedback if you have any :)
the current github-master is at version 3.3.1.dev0
but when running scripts, they advertise as
version = '3.2.0', because this is hardcoded.
Make this dynamic.
Every time I click "Run user-indicated re-receives" in the portal, it always do "rereceive" and "new" runs and I think this condition (if not new and not do_cleanup) is doing that.. how come it was changed from if not commandstorun and not do_cleanup_parameter:
to if not new and not do_cleanup:
in src/bots/engine.py?
The grammar for 850005010 is set to: ['ISA11', 'M', 1,'AN']
, but I am getting an error with the value of ^
which is valid for 005010. How would I get this to work?
In attempting to connect to a remote server via sFTP with a private key (no password, it's a test throwaway key) the system errors as "EOF Error".
From the debugging log, here's the result.
DEB [20161216-17:53:20.849] thr=3 paramiko.transport: EOF in transport thread
DEB [20161216-17:53:21.236] thr=4 paramiko.transport: starting thread (client mode): 0x23bdc10L
INF [20161216-17:53:21.299] thr=4 paramiko.transport: Connected (version 2.0, client OpenSSH_6.6.1)
DEB [20161216-17:53:21.344] thr=4 paramiko.transport: kex algos:['[email protected]', 'ecdh-sha2-nistp256', 'ecdh-sha2-nistp384', 'ecdh-sha2-nistp521', 'diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ecdsa-sha2-nistp256', 'ssh-ed25519'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', '[email protected]', '[email protected]', '[email protected]', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', '[email protected]'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', '[email protected]', '[email protected]', '[email protected]', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', '[email protected]'] client mac:['[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', 'hmac-md5', 'hmac-sha1', '[email protected]', '[email protected]', 'hmac-sha2-256', 'hmac-sha2-512', 'hmac-ripemd160', '[email protected]', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', 'hmac-md5', 'hmac-sha1', '[email protected]', '[email protected]', 'hmac-sha2-256', 'hmac-sha2-512', 'hmac-ripemd160', '[email protected]', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', '[email protected]'] server compress:['none', '[email protected]'] client lang:[''] server lang:[''] kex follows?False
DEB [20161216-17:53:21.345] thr=4 paramiko.transport: Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
DEB [20161216-17:53:21.345] thr=4 paramiko.transport: using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
DEB [20161216-17:53:21.445] thr=4 paramiko.transport: Switch to new keys ...
DEB [20161216-17:53:21.447] thr=2 paramiko.transport: [chan 1] Max packet in: 34816 bytes
WAR [20161216-17:53:21.576] thr=4 paramiko.transport: Oops, unhandled type 3
DEB [20161216-17:54:21.299] thr=4 paramiko.transport: EOF in transport thread
The issue seems to be in establishing the transport connection on line 1510 of the communication script.
When using PKI authentication it seems that the paramiko.transport.connect needs to be called differently using paramiko.transport.Transport.auth_publickey
.
Looking more into this now since password authentication works very smoothly with the current implementation.
Bots generates a default X12 997 after processing an inbound file. I don't completely understand the ins and outs of what its doing but it lacks some flexibility. Here is one example:
The basic need is generated 997s are are missing some ways to tweak the output. Not sure if there are others or if I am alone on this. Either way, I have been trying to figure out a non-intrusive way to do this (i.e. not in Bots core code) and haven't gotten anywhere.
I may have to make this change in Bots itself, and wanted to bring it up to elicit needs or concerns.
Any way to use bots as Python library?
Error below when running bots-webserver.py. Setup is Python 3.5 and Django 1.7:
File "/home/user/bots/bots-3.3.0/lib/python3.5/site-packages/django/utils/html_parser.py", line 12, in <module>
HTMLParseError = _html_parser.HTMLParseError
AttributeError: module 'html.parser' has no attribute 'HTMLParseError'
Reason for Error:
HTMLParseError is deprecated from Python 3.3 onwards and removed in Python 3.5.
http://thefourtheye.in/2015/02/15/python-35-and-django-17s-htmlparseerror/
Related to Issue 24 trying to pip install with python3.4 fails.
Collecting bots
Downloading bots-3.3.0.tar.gz (479kB)
100% |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 481kB 940kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/h3/mvmh74hd53g7q9knk4mql2s80000gn/T/pip-build-c_t106tp/bots/setup.py", line 54, in <module>
'\n\n' +
File "/private/var/folders/h3/mvmh74hd53g7q9knk4mql2s80000gn/T/pip-build-c_t106tp/bots/setup.py", line 46, in read
with io.open(fn, encoding=kwargs.get('encoding', 'utf8')) as fd:
FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/h3/mvmh74hd53g7q9knk4mql2s80000gn/T/pip-build-c_t106tp/bots/readme.rst'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/h3/mvmh74hd53g7q9knk4mql2s80000gn/T/pip-build-c_t106tp/bots/
https://bots-edi.github.io/ returns a 404 error for me looking at a clear cache for the documentation. I don't have a lot of experience with GitHub pages, but I'm happy to take a look if somebody can confirm that I'm not the only one seeing this.
I made setup.py
the other ones seems very old-style.
And since we can now use "pip install", it does not make sense to build windows-executables
IMHO we no longer need the other setup_*.py files
note This may be more akin to an epic than an issue and likely will have multiple issues tied to it, but I wanted to float the idea by the community.
Recently I've been somewhat dark on GitHub working on day job projects, but I've been working more and more with AWS Serverless technology and I'm seeing a use case for Bots doing that.
Scenario: As a trading partner, I store my incoming EDI files of whatever format in S3. On placing the file in S3, I need the file to be translated via bots running inside an AWS Lambda function and place it in another S3 location. This may then trigger another Lambda function, upload the data to a trading partner, or any other action including long-term archival of the transaction for later use in testing or data analytics.
In order to realize this state, our bots framework needs some architectural overhaul. These changes essentially decouple the application from its Django UI.
Here are my thoughts on the needed steps.
Please let me know what your thoughts are and if this would add elsewhere!
Bots contains its own 7 year old implementation of Ordereddict,
https://github.com/bots-edi/bots/blob/master/src/bots/bots_ordereddict.py
since we no longer support python 2.5, 2.6, It can be dropped.
I have added a guide on how to install bots under Windows by specifically installing the old dependencies further below.
I'm creating this issue so we can collect workarounds necessary to get the currently deployed version running, in the interest of creating a single place for future users to find the necessary patches.
Pull requests sound nice in theory, but if any significant work had been done, the latest release would not be from 2016.
In the interest of working around #67, I went through the following steps to get bots running:
Install Python 2.7 from official packages (python-2.7.16.amd64.msi
in my case)
python -m pip install CherryPy Django Genshi bots
Alter permissions of C:\Python27\Lib\site-packages\bots
to add change/modify permissions to Authenticated Users
Copy bots.ini
, settings.py
and settings.pyc
from C:\Python27\Lib\site-packages\bots\install
to C:\Python27\Lib\site-packages\bots\config
, overwriting the existing files.
Create the folder C:\Python27\Lib\site-packages\bots\botssys\sqlitedb
.
botssys
might already exist but be hidden.
Copy the file C:\Python27\Lib\site-packages\bots\install\botsdb
to C:\Python27\Lib\site-packages\bots\botssys\sqlitedb\botsdb
Edit C:\Python27\lib\site-packages\bots\webserver.py
, line 12:
change
from cherrypy import wsgiserver
to
from cheroot.wsgi import Server as wsgiserver, PathInfoDispatcher
Line 54:
change
dispatcher = wsgiserver.WSGIPathInfoDispatcher({'/': servedjango, str('/media'): servestaticfiles}) #UNICODEPROBLEM: needs to be binary
to
dispatcher = PathInfoDispatcher({'/': servedjango, str('/media'): servestaticfiles}) #UNICODEPROBLEM: needs to be binary
Line 55:
change
botswebserver = wsgiserver.CherryPyWSGIServer(bind_addr=('0.0.0.0', botsglobal.ini.getint('webserver','port',8080)), wsgi_app=dispatcher, server_name=botsglobal.ini.get('webserver','name','bots-webserver'))
to
botswebserver = wsgiserver(bind_addr=('0.0.0.0', botsglobal.ini.getint('webserver','port',8080)), wsgi_app=dispatcher, server_name=botsglobal.ini.get('webserver','name','bots-webserver'))
Edit C:\Python27\lib\site-packages\bots\urls.py
, line 2:
change
from django.conf.urls import patterns,include,url
to
from django.conf.urls import include,url
Line 12:
change
urlpatterns = patterns('',
to
urlpatterns = [
Line 44:
change
)
to
]
Line 5:
Add
from django.contrib.auth.views import login, logout, password_change, password_change_done
from bots.views import index
moving
from . import views
down to line 7.
Line 15-18:
Replace with:
url(r'^login.*', login, {'template_name': 'admin/login.html'}),
url(r'^logout.*', logout,{'next_page': '/'}),
url(r'^password_change/$', password_change, name='password_change'),
url(r'^password_change/done/$', password_change_done,name='password_change_done'),
Line 45:
change
url(r'^.*', 'bots.views.index'),
to
url(r'^.*', index),
Edit C:\Python27\lib\site-packages\bots\pluglib.py
, line 23 and line 48:
change
@django.db.transaction.commit_on_success #if no exception raised: commit, else rollback.
to
@django.db.transaction.atomic #if no exception raised: commit, else rollback.
Edit C:\Python27\lib\site-packages\bots\admin.py
:
Insert a new line 93 (shift def clean(self)
down to 94) and set it to fields = "__all__"
, properly indented to match the preceeding lines.
Insert a new line 193 (shift def clean(self)
down to 194) and set it to fields = "__all__"
, properly indented to match the preceeding lines.
Insert a new line 226 (shift def clean(self)
down to 227) and set it to fields = "__all__"
, properly indented to match the preceeding lines.
Edit C:\Python27\Lib\site-packages\bots\config\settings.py
, line 106-111:
replace with
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(PROJECT_PATH, 'templates')],
},
]
Edit C:\Python27\Lib\site-packages\bots\pluglib.py
:
Line 202:
Change
table = django.db.models.get_model('bots',plugintype)
to
table = django.apps.apps.get_model('bots',plugintype)
Line 336:
Change
table = django.db.models.get_model(app,tablename)
to
table = django.apps.apps.get_model(app,tablename)
Lines 231 and 240:
Change
fieldobject = table._meta.get_field_by_name(fieldname)[0]
to
fieldobject = table._meta.get_field(fieldname)
Edit C:\Python27\lib\site-packages\bots\templates\admin\base.html
, line 1:
Change
{% load admin_static %}{% load url from future %}<!DOCTYPE html>
to
{% load admin_static %}<!DOCTYPE html>
Then run bots-webserver.py
.
I am now at a point where the webserver is running, but it shows me an empty homepage. It lets me go through to the django admin login page and lets me log in.
I'll have to see how much of the actual functionality is given.
Anyone who figures out additional fixes (e.g. for the port issue) is wholeheartedly invited to join in.
Package versions:
bots 3.3.0
cheroot 8.2.1
CherryPy 17.4.2
Django 1.11.25
Genshi 0.7.3
All running on Windows Server 2016.
P.S.: Don't tell me to attach a diff/patch. The point is to allow people to manually fix the installation by following along.
The current forked master contains many changes by Henk-Jan since bots v3.2.0.
These were not yet released.
Also there is no hosted bots-package on pypi
There a pypi-page for bots 3.0.0, but without download, and pointing to sourceforge.
also the project-name there is not "bots", but "bots-open-source-edi-translator":
https://pypi.python.org/pypi/bots-open-source-edi-translator/
However, "bots" as project is still available on pypi. So let's quickly grab it.
I propose:
installing bots as then as simple as:
pip install bots
Can we add a gitter join chat button in the README?
Look here for an example: https://github.com/gitter-badger/ark
Line 79 - unfinished code:
queue.
Line 142 - missing column:
for thread in range(nr_threads)
various references to 'logger' which is commented out.
in setup.py, they can co-exist
scripts=[
'scripts/bots-webserver.py',
'scripts/bots-engine.py',
'scripts/bots-grammarcheck.py',
'scripts/bots-xml2botsgrammar.py',
'scripts/bots-updatedb.py',
'scripts/bots-dirmonitor.py',
'scripts/bots-jobqueueserver.py',
'scripts/bots-plugoutindex.py',
'scripts/bots-job2queue.py',
],
entry_points={
'console_scripts': [
'bots-dirmonitor = bots.dirmonitor:start',
'bots-engine = bots.engine:start',
'bots-engine2 = bots.engine:start',
'bots-grammarcheck = bots.grammarcheck:start',
'bots-job2queue = bots.job2queue:start',
'bots-jobqueueserver = bots.jobqueueserver:start',
'bots-plugoutindex = bots.plugoutindex:start',
'bots-updatedb = bots.updatedb:start',
'bots-webserver = bots.webserver:start',
'bots-xml2botsgrammar = bots.xml2botsgrammar:start',
]
},
2 different commands
bots-dirmonitor.py (script)
bots-dirmonitor (entrypoint, no .py-extenstion)
Not having an explicit encoding at the top of each python file, makes it ambiguous and error-prone.
I proposed to add an explicit encoding to each pytohn file according to
https://www.python.org/dev/peps/pep-0263/
The docs say that you can do things like this in your filenames: {frompartner}_{messagetype}_{datetime:%Y%m%d}.{editype}
I would like to get the EDI doctype (850, 860, etc) from the file and add it to the filename.
I've added a query to my envelope structure:
structure = [
{ID:'ISA',MIN:0,MAX:99999,
QUERIES:{
'frompartner': {'BOTSID':'ISA','ISA06':None},
'topartner': {'BOTSID':'ISA','ISA08':None},
'testindicator':{'BOTSID':'ISA','ISA15':None},
},
LEVEL:
[
{ID:'TA1',MIN:0,MAX:99999},
{ID:'GS',MIN:0,MAX:99999,
QUERIES:{
'version': {'BOTSID':'GS','GS08':None},
},
LEVEL:
[
{ID:'ST',MIN:0,MAX:99999,
QUERIES:{
'reference': {'BOTSID':'ST','ST02':None},
# HERE -> 'docnum': {'BOTSID':'ST','ST01':None},
},
SUBTRANSLATION:[
{'BOTSID':'ST','ST01':None},
]},
{ID:'GE',MIN:1,MAX:1},
]
},
{ID:'IEA',MIN:1,MAX:1}
]
}
]
The problem is that I am getting this error:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/bots/preprocess.py", line 165, in getedi
outgoing = Document(int(childrow['idta']), ta_from, os.path.basename(full_path), full_path.split('/')[-2], childrow[str('contenttype')])
IndexError: list index out of range
I am clearly adding this wrong to be able to get it into my filename. Is there a correct way of doing this?
Bots has a tremendous amount of work done with it's grammars and transforms. It's a shame that these pieces are so hard to use outside of a running bots instance. Ideally, these parts could be decoupled from the bots engine and ui.
Question: how many of you actually use the "-c"-switch on the commands
I do all the time,
bots-webserver.py -c/path/to/config/dir
bots-webengine.py -c/path/to/config/dir
the first argument is always the name of the command, here, bots-webengine.py
the second argument is a string "-c/path/to/config/dir" that needs to be parsed.
but adding a space, and it fails:
bots-webserver.py -c /path/to/config/dir
Error: configuration directory indicated, but no directory name.
now run:
python bots-webserver.py -c /path/to/config/dir
question: now what is the second argument?
for arg in sys.argv[1:]:
if arg.startswith('-c'):
configdir = arg[2:]
if not configdir:
print('Error: configuration directory indicated, but no directory name.')
sys.exit(1)
else:
print(usage)
sys.exit(0)
So this logic is broken.
I propose to use click to make the commandline-tools
http://click.pocoo.org/
File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 986, in _gcd_import
File "", line 969, in _find_and_load
File "", line 958, in _find_and_load_unlocked
File "", line 673, in _load_unlocked
File "", line 673, in exec_module
File "", line 222, in _call_with_frames_removed
File "/usr/local/lib/python3.5/dist-packages/bots/urls.py", line 4, in
from django.conf.urls import patterns, include, url
ImportError: cannot import name 'patterns'
I do not have ta_info
in my code and only use it on the inn
and out
passed into the function. Bots does not give a line number in which file so there is no way of actually finding where this error is occurring.
This is the detail:
Merged Error | 11 | 1 | x12 | 850005010 | steven_test_json_in | FGFan Groups228 | NameError: global name 'ta_info' is not defined | us-ascii | application/X12
I need to retrieve a JSON document from a RESTful API as a file. I then need to translate the document and make it a new JSON file. I then need to post it to another RESTful API.
At the moment I use bots to make XML documents from EDI X12 documents. Then a external receiver picks up the XML documents to import to another system.
I was hoping to use bots for API document movements. Any hints of how to add this feature? thanks.
So if this is truly a fork, it should have a new project name. Thoughts?
Even though there's support for dates and time separately, the formats D(T) & T(M), there's no support for timestamps:
Though there hasn't been a lot of activity here, there is potential for this to be a mature fork.
Does anyone mind if we rename this repo to just be "bots". Having "tmp" has a bad connotation.
What is the current Target Python version?
What is the minimum?
e.g. Minimum version tried is 3.0.0 (seems to work, and ideally is tested against this min)
Target Version is 3.1.2 (e.g. It better work with this one)
Last Tried is 3.4.5 (Might work with a later version of this, but until target / accepted, use at own risk)
(ALL fake versions)
I installed Bots straight as described in the documentation under Windows: Got the Python 2.7 Installer from the official site, got bots-3.2.0.win-amd64.exe from Sourceforge, installed both, all well.
Tried to run bots-webserver from Start Menu and...
Log in
Server Error (500)
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\django\core\handlers\base.py", line 201, in get_response
response = middleware_method(request, response)
File "C:\Python27\lib\site-packages\django\contrib\sessions\middleware.py", line 38, in process_response
request.session.save()
File "C:\Python27\lib\site-packages\django\contrib\sessions\backends\db.py", line 63, in save
obj.save(force_insert=must_create, using=using)
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 545, in save
force_update=force_update, update_fields=update_fields)
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 573, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 635, in _save_table
forced_update)
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 679, in _do_update
return filtered._update(values) > 0
File "C:\Python27\lib\site-packages\django\db\models\query.py", line 507, in _update
return query.get_compiler(self.db).execute_sql(None)
File "C:\Python27\lib\site-packages\django\db\models\sql\compiler.py", line 976, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "C:\Python27\lib\site-packages\django\db\models\sql\compiler.py", line 782, in execute_sql
cursor.execute(sql, params)
File "C:\Python27\lib\site-packages\django\db\backends\util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "C:\Python27\lib\site-packages\django\db\utils.py", line 99, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "C:\Python27\lib\site-packages\django\db\backends\util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "C:\Python27\lib\site-packages\django\db\backends\sqlite3\base.py", line 450, in execute
return Database.Cursor.execute(self, query, params)
OperationalError: attempt to write a readonly database
I'd take a wild guess and assume Django's SQLite-database was written in some system folder or is owned by the administrator I installed it with or something, but since Django was set up automagically in the background, I don't know where that DB is or in what state it is.
I was unable to find any similar issues.
Is this a known problem? What could cause this? Is the documentation missing a step?
Where is the "Master" documentation going to be kept?
e.g. How do I get this version, and get it to go, on a clean machine?
See several different doc attempts, including:
bots.readthedocs.io/en/latest/
skilchen.github.io/bots/
less is more.
importlib is part of the standard library in python2.7
I see no reason to keep a fork.
Hello
we have installed Bots for a big logistic company with a lot of route and channel (over 400 routes, 300 channels and 10 000 executions/day) and in the select box in the selection page, is not easy to find the right route to select.
The need the busyness user return us is also the possibility to select several route (transport order received and proof of delivery sent for example)
merge 3 readme-files
Hi,
I noticed that the json support is not that great:
Thanks in advance for improving this
I recently got the error message by e-mail:
Subject: [Django][Bots severe error] Database is damaged
Body:
"!Bots database is locked!
Bots did an integrity check on the database, but database was not OK.
Manual action is needed!
Bots has stopped processing EDI files."
After opening the database successfully with dbeaver (so not actually damaged or corrupt), I compared the tables with the test environment's version. I found that the mutex table was not empty, and in the docs, I found that this is a table used for 'locking' the database so that only one instance can use it. After deleting it's entry and restarting the bots service, everything worked fine.
My question: please make the error a bit easier to understand:
This, I experienced with version 3.2 of Bots on Ubuntu 16.04 LTS, after running for 7 months without any issues.
The Windows-installer is for Bots 3.2.0.
I coincidentally saw at PyPi that there is a version 3.3.0, but I cannot update my installation because...
Collecting bots
Downloading https://files.pythonhosted.org/packages/f2/b0/897cccaafb5a2f6e6ec26b4248cfd2bfc2ba680d58cb4e1ad898a96dbe27/bots-3.3.0-py2-none-any.whl (551kB)
|################################| 552kB 595kB/s
Installing collected packages: bots
Found existing installation: bots 3.2.0
ERROR: Cannot uninstall 'bots'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
This means that, in practice, there is no documentation on how to install the current Bots on Windows.
In combination with #66, it means that there is no documentation on how to install a functioning Bots on Windows at all.
I'll see if I can remove the distutils Bots installation and reinstall it through pip with the installer-based dependencies intact, but even if that works, it is far from ideal.
I came across this python as2 implementation which also uses Django. Figured I'd share, I'd like to do a write up on getting bots and this working together but not sure if or when I'll have time.
we should merge the docs-repo into the bots-package itself under /docs
hello,
i am installing the bots 3.3 and could be able ro run the command 'python bots-webserver.py' in the command line in windows. But with the localhost adress it comes out with bug that 'psycopg2.OperationalError: received invalid response to SSL negotiation: H'. I have tried to change with a different port number in the bots setting, but it doesn't work. Could anyone help? Thanks
I have received this error when tried to execute:
# django-admin syncdb --settings='bots.config.settings'
...
File "/usr/lib/python2.7/site-packages/bots/admin.py", line 20, in BotsAdmin
list_per_page = botsglobal.ini.getint('settings','adminlimit',botsglobal.ini.getint('settings','limit',30))
AttributeError: 'NoneType' object has no attribute 'getint'
grep
said that this variable is not used in bots/*.py
so I commented it and was able to execute script successfully.
Can you please clear related code (or delete this string if it really not needed).
I have partner syntax overrides for both the frompartner and the topartner. Both clearly declare merge to be false.
I have made sure the files are read by deliberately causing errors which then appear during the parsing run. (e.g. setting the EDI version to a value too large.)
So I have a proper partner syntax override, which I know is being read, which clearly states messages should not be merged, yet outbound EDIFACT-data still gets merged into a single file, and I can see that inn.ta_info['merge'] is still true as well as ta.merge in the database.
I've tried figuring out where the problem starts, but the code is rather convoluted.
I tried fixing it by manually setting merge to False in the mapping script, and I can see the effect on messages in the database, but the parent node (messagetype=edifact rather than INVOIC...) still registers with merge=1 and the messages still get merged.
Considering that partner-dependent non-merging of EDIFACT files is the specific example used for partner-specific syntax overrides, this is clearly a bug.
The documentation regarding EDI-splitting is useless, because it's working off the opposite premise:
Think of eg splitting up a shipment to the different orders. There are 2 ways of doing this:
Write multiple message to the same file .
Write each generated message to the same file, using alt translations.
...writing everything to the same file is the opposite of splitting them up.
It would be really nice if someone could provide a new, fresh GUI design.
The GUI looks like ages behind...
In a new virtualenv configuration, using pip to install cherrypy downloads version 10.0 by default. When attempting to boot the bots-monitor ./bots-webserver.py
this version of CherryPy throws a 'cannot import name wsgiserver error'
Traceback (most recent call last):
File "~/.virtualEnvs/bots/bin/bots-webserver.py", line 2, in <module>
from bots import webserver
File "~/.virtualEnvs/bots/lib/python2.7/site-packages/bots/webserver.py", line 12, in <module>
from cherrypy import wsgiserver
ImportError: cannot import name wsgiserver
The same behavior occurs for installing cherrypy 9.0.0 with pip. While the docs currently state dependency on cherrypy==3.1.0
, it has worked with higher versions for me in the past.
By installing cherrypy==8.9.1
, bots-monitor loads without issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.