Creating a new module problem

Started by Greg, September 10, 2013, 08:33:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Greg

What's the problem?

Compile error:
[ README   ]   module_strings.h
Traceback (most recent call last):
  File "../readme2modulestrings.py", line 108, in <module>
    seconds = float(split[0]) + float(split[1])
ValueError: could not convert string to float:


dmilligan

could be a problem with the version of python you are running

Greg

Quote from: dmilligan on September 10, 2013, 10:48:34 PM
could be a problem with the version of python you are running

I have Python 2.7.1+

a1ex

What's in the "split" variable? (print it)

Greg

My fix :

readme2modulestrings.py
- seconds = float(split[0]) + float(split[1])
- last_change_date = datetime.utcfromtimestamp(seconds).strftime("%Y-%m-%d %H:%M:%S UTC")


Now work  ;)


Pelican

last_change_date = run("LC_TIME=EN hg log . -l 1 --template '{date|hgdate}'")
split = last_change_date.split(" ")
seconds = float(split[0]) + float(split[1])
last_change_date = datetime.utcfromtimestamp(seconds).strftime("%Y-%m-%d %H:%M:%S UTC")

I guess the new module not in the hg repo so you cannot get log info from there so the split is empty.
EOS 7D Mark II, EOS 7D, EOS 5, EOS 100 + lenses (10mm to 300mm), 600EX, 550EX, YN600EX x 3
EOScard, EOS DSLR firmwares, ARMu, NiControl, etc.: http://pel.hu/down

Greg

greg@ubuntu:~/magic-lantern-sensor-cleaning$ hg commit -m "Sensor cleaning module"
nothing changed
:-\

How to add a new module to the bitbucket?

dmilligan

hg commit only commits to your local repo, you then need to push that commit to the remote bitbucket repo with hg push

Greg

Yes, but to do hg push you need to do before hg commit. It does not work for new files.

Audionut


1%


Greg