Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object conversion error #19

Closed
long-feng opened this issue Dec 6, 2016 · 2 comments
Closed

object conversion error #19

long-feng opened this issue Dec 6, 2016 · 2 comments

Comments

@long-feng
Copy link

Hi Ian,

I'm trying to use DiskJockey on a more powerful server. DiskJockey tests passed using Pkg.test("DiskJockey"). However, when I try to make structure, the error : ' LoadError: MethodError: Cannot convert an object of type String to an object of type Float64' prevents me going further.

All the things go smooth with my desktop, also in Linux system, but with a older version of Julia (v0.4).
I'm not sure if this error is something related with Julia updates?

I copied the output here, and ignored many warnings.

Thanks!
Feng


[longfeng@phuket Keplerain_Disk]$ ls
config.yaml data.hdf5 InitializeWalkers.ipynb Makefile
[longfeng@phuket Keplerain_Disk]$
[longfeng@phuket Keplerain_Disk]$
[longfeng@phuket Keplerain_Disk]$
[longfeng@phuket Keplerain_Disk]$ max_baseline.jl
WARNING: Base.ASCIIString is deprecated, use String instead.
likely near /home/longfeng/.julia/v0.5/DiskJockey/src/constants.jl:65
..... similar warnings

WARNING: deprecated syntax "[a=>b for (a,b) in c]".
Use "Dict(a=>b for (a,b) in c)" instead.

WARNING: deprecated syntax "[a=>b for (a,b) in c]".
Use "Dict(a=>b for (a,b) in c)" instead.
WARNING: Base.ASCIIString is deprecated, use String instead.

Dataset channels are velocities from -10.517295788189767 to -42.656605289812504 and span -32.13930950162273 km/s.
Midpoint is -26.586950539001137 km/s.
Max baseline 338.5121039138373 kilolambda
Nyquist sampling satisfied. dRA: 0.0234375 [arcsec/pix] ; dRA_max: 0.2769671424693894 [arcsec/pix]
Image size satisfied. Half-Image size at the closest distances: 510.0 [AU]; outer radius of the grid + 10%: 330.0 [AU]
[longfeng@phuket Keplerain_Disk]$
[longfeng@phuket Keplerain_Disk]$
[longfeng@phuket Keplerain_Disk]$ make structure
WARNING: Base.ASCIIString is deprecated, use String instead.
likely near /home/longfeng/.julia/v0.5/DiskJockey/src/constants.jl:65
WARNING: deprecated syntax "[a=>b for (a,b) in c]".
Use "Dict(a=>b for (a,b) in c)" instead.
ERROR: LoadError: MethodError: Cannot convert an object of type String to an object of type Float64
This may have arisen from a call to the constructor Float64(...),
since type constructors fall back to convert methods.
in copy!(::Array{Float64,1}, ::Base.Generator{Array{String,1},DiskJockey.model.##8#9{Dict{Any,Any}}}) at ./abstractarray.jl:487
in _collect(::Type{Float64}, ::Base.Generator{Array{String,1},DiskJockey.model.##8#9{Dict{Any,Any}}}, ::Base.HasShape) at ./array.jl:251
in convert_dict(::Dict{Any,Any}, ::String) at /home/longfeng/.julia/v0.5/DiskJockey/src/model.jl:373
in include_from_node1(::String) at ./loading.jl:488
in process_options(::Base.JLOptions) at ./client.jl:262
in _start() at ./client.jl:318
make: Nothing to be done for 'structure'.

@iancze
Copy link
Owner

iancze commented Dec 6, 2016

Hi Feng,

There are a few things that might be causing this error. The main thing that jumps out is that it looks like you are using Julia v0.5 on the server, while the current version of DiskJockey in the github repository master branch is only for v0.4. However, I did recently upgrade the development version to v0.5, so you can try obtaining that by doing the following on the server.

$ cd /home/longfeng/.julia/v0.5/DiskJockey
$ git pull
$ git checkout devel

This should put you into the development version of DiskJockey, which is for Julia v0.5.

The other thing that might cause this error is if you happen to have a typo in your config.yaml file, particularly when entering the parameter values. Things such as entering integers (e.g. M_star : 1) or double decimal points (e.g. M_star : 1.0.0) by accident have caused similar errors for me.

I think the WARNING: deprecated syntax "[a=>b for (a,b) in c]". notifications are coming from some of the packages that DiskJockey depends on, so once these are upgraded to v0.5 these should go away.

Please let me know if this fixes the issue.

@long-feng
Copy link
Author

long-feng commented Dec 7, 2016 via email

@iancze iancze closed this as completed Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants