Comments (5)
still float error. you probably need to test it yourself. probably you would know why it attempts to parse something as float.
also the quotes i have in some other example. i was just experimenting if the error changes
from tracboat.
I still need to properly test the usermap
specification, anyway you could try this way:
# cat comment.toml
[tracboat]
# ... stuff
[tracboat.usermap]
glen = "glen"
foo = "bar"
There is also the possibility to specify multiple mappings via command line options:
tracboat migrate --mock --usermap glen glen --usermap foo bar
Please note that, as usual, command line options will override what is specified via configuration file, so:
tracboat --config-file=comment.toml migrate --mock --usermap glen glen --usermap foo FOOUSER
User foo
is bar
inside the file but the FOOUSER
value will take precedence.
from tracboat.
getting same exception
# tracboat --config-file=comment.toml migrate --mock
Traceback (most recent call last):
File "/home/glen/tracboat/VENV/bin/tracboat", line 9, in <module>
load_entry_point('tracboat==0.2.0-alpha', 'console_scripts', 'tracboat')()
File "/home/glen/tracboat/tracboat/cli.py", line 412, in main
cli(obj={})
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 1063, in invoke
Command.invoke(self, ctx)
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/glen/tracboat/tracboat/cli.py", line 198, in cli
conf = toml.load(config_file).get('tracboat', {})
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/toml.py", line 40, in load
return loads(ffile.read(), _dict)
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/toml.py", line 286, in loads
ret = _load_line(line, currentlevel, multikey, multibackslash)
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/toml.py", line 353, in _load_line
value, vtype = _load_value(pair[1])
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/toml.py", line 508, in _load_value
raise TomlDecodeError("This float doesn't have a leading digit")
toml.TomlDecodeError: This float doesn't have a leading digit
# cat comment-users.toml
[tracboat]
lammas = "123"
[tracboat.usermap]
glen = glen
and without specifying user map or user map file, get key error:
(VENV)root@soa:~/tracboat# tracboat --config-file=comment.toml migrate --mock
Traceback (most recent call last):
File "/home/glen/tracboat/VENV/bin/tracboat", line 9, in <module>
load_entry_point('tracboat==0.2.0-alpha', 'console_scripts', 'tracboat')()
File "/home/glen/tracboat/tracboat/cli.py", line 412, in main
cli(obj={})
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/glen/tracboat/tracboat/cli.py", line 115, in wrapper
return func(*args, **kwargs)
File "/home/glen/tracboat/tracboat/cli.py", line 171, in wrapper
return func(*args, **kwargs)
File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/glen/tracboat/tracboat/cli.py", line 352, in migrate
umap.update(toml.load(config_file)['usermap'])
KeyError: 'usermap'
from tracboat.
You're right, I spotted an error on my side, I have to wait for this evening to fix it (I'm doing this in my spare time) but you could try to change the line cli.py:352
to:
umap.update(toml.load(config_file)['tracboat']['usermap'])
I'm sorry, I'm not 100% sure about this though, I have to try it first.
In the meantime I see one issue on your side, you should quote values (and not keys) in TOML:
# ...
[tracboat.usermap]
glen = "glen"
from tracboat.
@glensc give a look at #17, needs testing but it should be fairly complete.
from tracboat.
Related Issues (20)
- unable to match users by aliases
- use gitlab-export format HOT 3
- minimum python2.7 requirement
- Plan to support GitLab 11? HOT 3
- 11.4 Migration Issue. HOT 1
- Migrating Trac 1.2 to Gitlab 11.5.0 HOT 4
- xml.parsers.expat.ExpatError: not well-formed (invalid token) HOT 37
- UnicodeDecodeError: 'utf8' codec can't decode byte 0xd0 in position 0: invalid continuation byte HOT 4
- OOM during migrate HOT 3
- problems with attachments and encoding HOT 22
- wiki migration "file already exists" HOT 1
- 11.9.7-ce.0: missing index_issues_on_project_id_and_iid update
- Environment variable TRACBOAT_TRAC_URI not taken into account HOT 1
- Export fails if attachments can't be found HOT 1
- 400 bad request
- how does mock migration works? HOT 1
- 12.x support? HOT 2
- 12.7.5 : AttributeError: 'module' object has no attribute 'IssueAssignees'
- 13.x support
- look-behind requires fixed-width pattern
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tracboat.