Author Topic: Creating a new module problem  (Read 7730 times)

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 587
Creating a new module problem
« on: September 10, 2013, 08:33:17 PM »
What's the problem?

Compile error:
Code: [Select]
[ 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

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Creating a new module problem
« Reply #1 on: September 10, 2013, 10:48:34 PM »
could be a problem with the version of python you are running

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 587
Re: Creating a new module problem
« Reply #2 on: September 10, 2013, 11:12:40 PM »
could be a problem with the version of python you are running

I have Python 2.7.1+

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: Creating a new module problem
« Reply #3 on: September 10, 2013, 11:14:54 PM »
What's in the "split" variable? (print it)

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 587
Re: Creating a new module problem
« Reply #4 on: September 11, 2013, 12:32:33 AM »
My fix :

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

Now work  ;)


Pelican

  • Contributor
  • Senior
  • *****
  • Posts: 406
Re: Creating a new module problem
« Reply #5 on: September 11, 2013, 01:08:48 AM »
Code: [Select]
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

  • Contributor
  • Hero Member
  • *****
  • Posts: 587
Re: Creating a new module problem
« Reply #6 on: September 11, 2013, 03:21:11 AM »
greg@ubuntu:~/magic-lantern-sensor-cleaning$ hg commit -m "Sensor cleaning module"
nothing changed
:-\

How to add a new module to the bitbucket?

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Creating a new module problem
« Reply #7 on: September 11, 2013, 04:19:05 AM »
hg commit only commits to your local repo, you then need to push that commit to the remote bitbucket repo with hg push

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 587
Re: Creating a new module problem
« Reply #8 on: September 11, 2013, 04:24:51 AM »
Yes, but to do hg push you need to do before hg commit. It does not work for new files.

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3565
  • Blunt and to the point
Re: Creating a new module problem
« Reply #9 on: September 11, 2013, 04:29:44 AM »
Try hg update first.

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: Creating a new module problem
« Reply #10 on: September 11, 2013, 05:10:40 AM »
also hg add

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 587
Re: Creating a new module problem
« Reply #11 on: September 11, 2013, 01:51:04 PM »