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

ValueError: No JSON object could be decoded #1

Open
ngcthuong opened this issue Jul 15, 2016 · 5 comments
Open

ValueError: No JSON object could be decoded #1

ngcthuong opened this issue Jul 15, 2016 · 5 comments

Comments

@ngcthuong
Copy link

ngcthuong commented Jul 15, 2016

I got this error when running your code in Anaconda2 prompt.
Is there any way to fix this.
My System: Window 10, Anaconda 2, python 2.7.

Thanks for your time,

C:\CFRBM-master>make run
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python cfrbm/user_based.py ubased.json
Using gpu device 0: GeForce GTX 960 (CNMeM is disabled, cuDNN 5005)
Traceback (most recent call last):
  File "cfrbm/user_based.py", line 168, in <module>
    experiments = read_experiment(sys.argv[0])
  File "C:\CFRBM-master\cfrbm\experiments.py", line 7, in read_experiment
    experiments = json.loads(data.read())['experiments']
  File "C:\Users\user4\Anaconda2\lib\json\__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "C:\Users\user4\Anaconda2\lib\json\decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\user4\Anaconda2\lib\json\decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
makefile:2: recipe for target 'run' failed
make: *** [run] Error 1
@ngcthuong ngcthuong changed the title ValueError: No JSON object could eb decoded ValueError: No JSON object could be decoded Jul 15, 2016
@felipecruz
Copy link
Owner

Hi @AtenaKid . This do not happen in my linux nor OSX Boxes. Can you wait few days so I can try at my wife's computer? (windows 10 like yours)

@felipecruz
Copy link
Owner

Hello @AtenaKid . I had some progress running on a windows box but I'm stuck on another problem which is an importing error. Give few more days :)

@felipecruz
Copy link
Owner

felipecruz commented Jul 24, 2016

Hello @AtenaKid . This code is not the original on the repository

experiments = read_experiment(sys.argv[0])

If you change sys.argv[0] to sys.argv[1] and correct json file will be parsed

@ngcthuong
Copy link
Author

Hello @felipecruz, thank you for your feedback. Could you give more suggestion on how to correct json file?

@felipecruz
Copy link
Owner

An experiment json file working example:

{
  "experiments": [
    {
      "name": "100k-u1xu1",
      "train_path": "ml-100k/u1.base",
      "test_path": "ml-100k/u1.test",
      "sep": "\t",
      "configs": [
        {
          "name": "initial_experiment",
          "epochs": 100,
          "batch_size": 10,
          "number_hidden": 100,
          "ks": [
            1
          ],
          "momentums": [
            0.5,
            0.6
          ],
          "l_w": [
            0.0005
          ],
          "l_v": [
            0.0005
          ],
          "l_h": [
            0.0005
          ],
          "decay": 0.0002
        }
      ]
    }
  ]
}

This requires the ml-100k dataset in the root of this project inside a folder named "ml-100k"

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