-
Notifications
You must be signed in to change notification settings - Fork 27
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
Run the code on Colab #3
Comments
I am facing the same issue when running on my Mac M1. My environment is as follows:
Can you share your local environment? |
Here is the simpler reproduced error: >>> from pyhocon import ConfigFactory
>>> conf = ConfigFactory.parse_file('conf/default.cnf') # successful
>>> But for the file required in this project: >>> from pyhocon import ConfigFactory
>>> conf = ConfigFactory.parse_file('conf/exp/srn.conf')
pyparsing.exceptions.ParseException: Expected '}', found '=' (at char 759), (line:34, col:18)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/prashantdandriyal/miniforge3/envs/pixelnerf2/lib/python3.9/site-packages/pyhocon/config_parser.py", line 142, in parse_file
return cls.parse_string(content, os.path.dirname(filename), resolve, unresolved_value)
File "/Users/prashantdandriyal/miniforge3/envs/pixelnerf2/lib/python3.9/site-packages/pyhocon/config_parser.py", line 192, in parse_string
return ConfigParser().parse(content, basedir, resolve, unresolved_value)
File "/Users/prashantdandriyal/miniforge3/envs/pixelnerf2/lib/python3.9/site-packages/pyhocon/config_parser.py", line 455, in parse
config = config_expr.parseString(content, parseAll=True)[0]
File "/Users/prashantdandriyal/miniforge3/envs/pixelnerf2/lib/python3.9/site-packages/pyparsing/core.py", line 1141, in parse_string
raise exc.with_traceback(None)
pyparsing.exceptions.ParseSyntaxException: Expected '}', found '=' (at char 759), (line:34, col:18) |
Hi pra-dan, |
@tsubu01 Hi. I ran it locally so can't exactly say much. I recommend that you start with trying different versions of pyhocon and ensuring that the conf file can be loaded (similar to what I did above). |
Thanks! I eventually solved it.
|
Hi, i try to run the code on the colab, and I find that the code run perfectly on my local laptop(fail because of fun out of PU memory), but on the Colab it throw out an error call "parseexception: expected '}', found '=' (at char 759), (line:34, col:18)" in cell "def extra_args(parser):". It is quiet weird. Because I think parser arg is greatly written, on the other hand when I run the cell locally there is no problem at all.
Did u have any idea?
The text was updated successfully, but these errors were encountered: