Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InsertCursor und UpdateCursor starten Edit Session nicht automatisch auf Nicht-Englischen Systemen #1

Open
Astrolux opened this issue May 2, 2020 · 1 comment

Comments

@Astrolux
Copy link

Astrolux commented May 2, 2020

Die Init Funktion von Insert und Update Cursor prüft ob schon eine Edit Session gestartet ist, indem die Fehlermeldung auf das Vorkommen des Textes "edit session" geprüft wird. Fall der Fehler auftritt, wird dieser abgefangen und eine Edit Session automatisch geöffnet.

Codesnippet

        try:
            super(InsertCursor, self).__init__(datatable, field_names)
        except RuntimeError as e:
            if 'edit session' in str(e).lower() and kwargs.get('auto_edit', True):
                self._editor = Editor(datatable)
                self._editor.start()
                super(InsertCursor, self).__init__(datatable, field_names)
                return
            raise

Dies funktioniert nur, wenn die Fehlermeldung englisch ist, was nicht immer der Fall ist.

Muss auch in anderen Sprachen funktionieren.

@GeoSander
Copy link
Contributor

This is a known issue.
The current gpf version does not provide multi-language support (i18n) yet. This also means, that any errors thrown by the gpf will be displayed in English only.
There are currently no plans to add support for it. This means that, for the time being, you could uninstall the current gpf, fork this repo, change the source code and then use pip to re-install it (in editable mode).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants