tkwant-energy-transport issueshttps://gitlab.kwant-project.org/spec-gmt/tkwant-energy-transport/-/issues2019-05-15T16:54:21Zhttps://gitlab.kwant-project.org/spec-gmt/tkwant-energy-transport/-/issues/2A problem apparently related to `*args` and `**kwargs`2019-05-15T16:54:21ZAdel Kara SlimaneA problem apparently related to `*args` and `**kwargs`Here's the error I get when I try to run the python example [`LeadHeatCurrent.py`](https://gitlab.kwant-project.org/AdelKS/tkwant/blob/vitrine/Examples/LeadHeatCurrent.py)
```shell
Traceback (most recent call last):
File "LeadHeatCurr...Here's the error I get when I try to run the python example [`LeadHeatCurrent.py`](https://gitlab.kwant-project.org/AdelKS/tkwant/blob/vitrine/Examples/LeadHeatCurrent.py)
```shell
Traceback (most recent call last):
File "LeadHeatCurrent.py", line 520, in <module>
main(a, t_lam, boundaries_type, num_cells, strength, degree, tmax, dt, integration_methods, integration_error, nb_points, plotSystem, showFigure, run_simulation, plots, plot_times, plot_hoppings, showPlots, params)
File "LeadHeatCurrent.py", line 439, in main
results = calculations(syst, lat, lead, tmax, t, boundaries_type, num_cells, strength, degree, times, method, nb_points, integration_error, plots, plot_times, plot_hoppings, file_name_basis, showPlots, params)
File "LeadHeatCurrent.py", line 368, in calculations
tderiv_Hamil=tderiv_Hamil)
File "tkwant/operatorsHeatCurrent.pyx", line 85, in tkwant.operatorsHeatCurrent.heatCurrentWithIc.__init__
File "tkwant/operatorsHeatCurrent.pyx", line 289, in tkwant.operatorsHeatCurrent.LeadEnergyCurrent.__init__
File "kwant/operator.pyx", line 902, in kwant.operator.Current.__init__
File "kwant/operator.pyx", line 441, in kwant.operator._LocalOperator.__init__
File "kwant/operator.pyx", line 264, in kwant.operator._normalize_onsite
File "/usr/local/lib/python3.6/dist-packages/kwant-1.4.1-py3.6-linux-x86_64.egg/kwant/_common.py", line 170, in get_parameters
error("Value functions must not take *args or **kwargs")
File "/usr/local/lib/python3.6/dist-packages/kwant-1.4.1-py3.6-linux-x86_64.egg/kwant/_common.py", line 149, in error
fname = inspect.getsourcefile(func)
File "/usr/lib/python3.6/inspect.py", line 684, in getsourcefile
filename = getfile(object)
File "/usr/lib/python3.6/inspect.py", line 666, in getfile
'function, traceback, frame, or code object'.format(object))
TypeError: <cyfunction LeadEnergyCurrent.__init__.<locals>.onsiteHamil at 0x7f824ea8ff60> is not a module, class, method, function, traceback, frame, or code object
```
For now I am still trying to understand what's wrong exactly.Adel Kara SlimaneAdel Kara Slimanehttps://gitlab.kwant-project.org/spec-gmt/tkwant-energy-transport/-/issues/1python doesn't see that tkwant has an 'operatorsHeatCurrent' module2019-04-23T09:33:54ZAdel Kara Slimanepython doesn't see that tkwant has an 'operatorsHeatCurrent' moduleI tried to make tkwant with heat work on a fresh Ubuntu 18.04 LTS virtualised live version, I followed the procedure written in the readme file. And when I run the example code, in 'Vitrine' branch, under the folder 'Examples, I get the ...I tried to make tkwant with heat work on a fresh Ubuntu 18.04 LTS virtualised live version, I followed the procedure written in the readme file. And when I run the example code, in 'Vitrine' branch, under the folder 'Examples, I get the following error:
```shell
Traceback (most recent call last):
File "LeadHeatCurrent.py", line 520, in <module>
main(a, t_lam, boundaries_type, num_cells, strength, degree, tmax, dt, integration_methods, integration_error, nb_points, plotSystem, showFigure, run_simulation, plots, plot_times, plot_hoppings, showPlots, params)
File "LeadHeatCurrent.py", line 439, in main
results = calculations(syst, lat, lead, tmax, t, boundaries_type, num_cells, strength, degree, times, method, nb_points, integration_error, plots, plot_times, plot_hoppings, file_name_basis, showPlots, params)
File "LeadHeatCurrent.py", line 366, in calculations
operator = tkwant.operatorsHeatCurrent.heatCurrentWithIc(syst, mu,
AttributeError: module 'tkwant' has no attribute 'operatorsHeatCurrent'
```
Running the file `tkwantExample.py', that doesn't use our operators, works.
@PhiRe Do you think it's due to something wrong in the installation procedure or we need to add something to tell that the module `operatorsHeatCurrent` exists ? From what I am seeing `operatorsHeatCurrent.pyx` is the only file that has the `.pyx` extension. All the other modules are simple python `.py` files.Phillipp ReckPhillipp Reck