poetry develop failing on non-ASCII characters
See original GitHub issueauthors = [
"Sébastien Eustace <sebastien@eustace.io>"
]
$ poetry develop -vvv
[AttributeError]
'NoneType' object has no attribute 'group'
authors = [
"Sebastien Eustace <sebastien@eustace.io>"
]
Installing dependencies from lock file
Nothing to install or update
Installing poetry (0.11.0-alpha.3)
As far as I know, the re
library doesn’t have any ability to support unicode character classes but regex
can handle them properly.
I don’t know if this has been brought up before or this is a windows-only thing, considering this happened while poetry develop
ing poetry itself. as far as I checked, nobody has made an issue about this before.
Windows 10, python 3.6.4, poetry 0.11.0a3.
edit: #66 is similar.
In the meantime, catching errors:
def _get_author(self): # type: () -> dict
+ if self._authors:
+ m = AUTHOR_REGEX.match(self._authors[0])
+ else:
+ m = None
- if not self._authors:
+ if not m:
+ # log.info('Could not find an author') or whatever
return {"name": None, "email": None}
m = AUTHOR_REGEX.match(self._authors[0])
name = m.group("name")
email = m.group("email")
return {"name": name, "email": email}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:25 (12 by maintainers)
Top Results From Across the Web
Python Translation Poetry Ascii Trouble - Stack Overflow
I'm trying to figure out a way to deal with special characters that can not be found in the standard Ascii chart. I'm...
Read more >Error with non-ASCII character? - Python Forum
I suspect this is due to my username containing non-ASCII characters. The first such character in the username is "á", which in ANSI...
Read more >History | Poetry - Python dependency management and ...
Fixed deadlocks when installing packages on systems not supporting non-ascii characters (#2721). Fixed handling of wildcard constraints for packages with ...
Read more >Is it a good idea to use non-ASCII names in the U.S.? [closed]
You can have problems with ASCII names too. My cousin has an ASCII name and always has a lot of trouble because it...
Read more >William Carlos Williams | Poetry Foundation
From these moments, poetry developed: "it has fluttered before me for a moment, ... What Williams did not foresee, however, was the "atom...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jacebrowning Thanks for the pointer a few months back regarding
AUTHOR_REGEX
. After a bit of experimentation, I think that this has to do not with Poetry per se but rather with a bug in there
module (see https://github.com/lark-parser/lark/issues/590).Replacing
re
withregex
solves everything:So my question would now be - should I submit a pull request with
import regex as re
to Poetry? Or would adding a dependency risk breaking things? Thanks!@vlcinsky sure I understand. I just needed to get something done really quickly.
The full output:
I have installed it like this: