NoMethodError on Python Duplication engine
kengz opened this issue · 6 comments
Shits on fire yo. The same code got an error from the duplication engine. See the original CC build here. If you see the commit for the build, that python file causing the error is not changed from previous build. The project is here.
OpenJDK 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release
NoMethodError error occurred processing file ./lib/client.py: aborting.NoMethodError error occurred processing file ./lib/py/hello_rb.py: aborting.
NoMethodError: undefined method `fetch' for "":String
python_version at /usr/src/app/lib/cc/engine/analyzers/python/main.rb:30
parser at /usr/src/app/lib/cc/engine/analyzers/python/main.rb:26
process_file at /usr/src/app/lib/cc/engine/analyzers/python/main.rb:22
run at /usr/src/app/lib/cc/engine/analyzers/analyzer_base.rb:23
block in process_files at /usr/src/app/lib/cc/engine/analyzers/reporter.rb:38
block in run at /usr/src/app/lib/cc/engine/analyzers/file_thread_pool.rb:22Hey @kengz, thanks for opening this issue. We did recently change this engine to add configurable support for Python 3. We meant it to be backwards-compatible, but it looks like it wasn't for you. We'll dig into that further as soon as we can.
In the meantime, a short term fix for your repo is that you can change your .codeclimate.yml from
duplication:
enabled: true
config:
languages:
javascript:
python:
ruby:To:
duplication:
enabled: true
config:
languages:
- javascript
- python
- rubyI just forked your repo and verified that it doesn't error.
Apologies for the inconvenience.
@maxjacobson thanks for the quick reply. Another issue is the PR webhook (status check) shows error even tho the build on cc's site is ok. This has been the case for the past few days too, will it be fixed together too?
In order to do the comparison for a pull request, we need two successful builds, one from the merge base, and one from your branch. The build for your branch is succeeding, but the merge base will continue to fail because of the configuration-loading bug. I believe if you merge around this red status check, subsequent PRs will have correct status checks. Again, apologies, I know that's a bit confusing.
Ok great. Since the build's passed, feel free to close this issue :) Thank again
👍 my pleasure. I'll leave this open until we look into the config-loading behavior.